home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / os2 / 4os295.zip / 4OS2.INF (.txt) < prev    next >
OS/2 Help File  |  1992-03-27  |  131KB  |  4,662 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About 4OS2 Help ΓòÉΓòÉΓòÉ
  3.  
  4. 4OS2 Preliminary On-line Documentation (Version 0.95, 3/27/92) 
  5.  
  6. Text by Rex Conn and Tom Rawson, converted to OS/2 format by Matthew J. Palcic. 
  7.  
  8. Copyright 1992, Rex Conn and JP Software Inc., All Rights Reserved. 4OS2 is a 
  9. trademark and 4DOS is a registered trademark of JP Software Inc.  OS/2 is a 
  10. registered trademark of International Business Machines Corporation.  Other 
  11. product and company names are trademarks of their respective owners. 
  12.  
  13. This online help system for 4OS2 includes all 4OS2 internal commands. 
  14.  
  15. The help system is fully indexed and cross-indexed.  If you press F1 with a 
  16. command already on the command line, the help system will display help for that 
  17. command.  If the line is blank, the help topic index is displayed. 
  18.  
  19.  
  20. ΓòÉΓòÉΓòÉ 2. Using 4OS2 ΓòÉΓòÉΓòÉ
  21.  
  22. This section includes details on the 4OS2 command line editing keys, internal 
  23. variables and variable functions, redirection, and command grouping.  See the 
  24. individual topics listed under this heading for details. 
  25.  
  26.  
  27. ΓòÉΓòÉΓòÉ 2.1. 4OS2 and 4DOS ΓòÉΓòÉΓòÉ
  28.  
  29. Most 4DOS commands and features work the same way in 4OS2.  However if you're 
  30. an experienced 4DOS user or want to use the same batch files and aliases in 
  31. both 4OS2 and 4DOS, there are some differences between 4DOS and 4OS2 you should 
  32. be aware of: 
  33.  
  34.     *   The default command separator is ^ in 4DOS; in 4OS2 it is & (for 
  35.         compatibility with CMD.EXE).  You can change it in 4OS2.INI or with the 
  36.         SETDOS /C command. 
  37.  
  38.     *   The default escape separator is  (Control-X) in 4DOS; in 4OS2 it is ^ 
  39.         (for compatibility with CMD.EXE).  You can change it in 4OS2.INI or 
  40.         with the SETDOS /E command. 
  41.  
  42.     *   The alias and variable parameter syntax is %n& in 4DOS; in 4OS2 it is 
  43.         %n$ (because & is used in 4OS2 as the command separator). 
  44.  
  45.     *   The following 4DOS commands do not exist in 4OS2: BREAK, CTTY, 
  46.         KEYSTACK, LOADHIGH / LH, SWAPPING, and TRUENAME. 
  47.  
  48.     *   The following 4DOS internal variables and variable functions are not 
  49.         relevant or cannot be implemented under OS/2 and therefore do not exist 
  50.         in 4OS2: %_ALIAS, %_DV, %_ENV, %_WIN, %@EMS[], %@EXTENDED[], %@LPT[], 
  51.         %@REMOVABLE[], %@TRUENAME[], and %@XMS[].  There are several new 
  52.         internal variables and variable functions available in 4OS2; see 4OS2 
  53.         Internal Variables or 4OS2 Variable Functions for more information. 
  54.  
  55.     *   The following 4DOS.INI directives cannot be used in the 4OS2.INI file: 
  56.         Alias, ANSI, AutoExecPath, EnvFree, Environment, FineSwap, FullINT2E, 
  57.         HelpOptions, HelpPath, LineInput, MessageServer, Reduce, ReserveTPA, 
  58.         StackSize, Swapping, SwapReopen, UMBEnvironment, and UMBLoad.  One new 
  59.         directive is available in 4OS2.INI which is not available in 4DOS: 
  60.         LocalLists. (The alias list size and environment size are set 
  61.         automatically by 4OS2; the other directives are not relevant under 
  62.         OS/2.)  See 4OS2.INI for more information. 
  63.  
  64.  
  65. ΓòÉΓòÉΓòÉ 2.2. Editing the Command Line ΓòÉΓòÉΓòÉ
  66.  
  67. The 4OS2 command line offers full editing, and can also display the command 
  68. history in a window (see below).  The command line accepts up to 299 
  69. characters. 
  70.  
  71. The following keys have special meaning when entered at the command line (the 
  72. caret ^ means press the Ctrl key together with the specified key): 
  73.  
  74.                Move the cursor left one character. 
  75.                Move the cursor right one character. 
  76.                Recall the previous command from the history list, or match a 
  77.                 partial command entry with a history list entry. 
  78.                Recall the next command from the history list, or match a 
  79.                 partial command entry with a history list entry. 
  80.  ^             Move the cursor left one word. 
  81.  ^             Move the cursor right one word. 
  82.  Home           Move the cursor to the beginning of the line. 
  83.  ^Home          Delete from the beginning of the line to the character 
  84.                 preceding the cursor. 
  85.  End            Move the cursor to the end of the line. 
  86.  ^End           Delete from the cursor to the end of the line. 
  87.  Ins            Toggle between insert and overstrike mode. 
  88.  Del            Delete the character at the cursor. 
  89.  Backspace      Delete the character to the left of the cursor. 
  90.  Enter          Execute the command. 
  91.  Esc            Erase the entire line. 
  92.  ^L             Delete the word to the left of the cursor. 
  93.  ^R             or ^Backspace  Delete the word to the right of the cursor. 
  94.  ^C             Abort the command. 
  95.  ^D             Delete the history list entry, and erase the line. 
  96.  ^E             Go to the last entry in the history list. 
  97.  ^K             Save the command to the history list without executing it, and 
  98.                 erase the line. 
  99.  F1             Call the on-line help. 
  100.  F3             Fill in the rest of the line (beyond any characters that have 
  101.                 already been typed) from the last line in the history. 
  102.  Tab            (or F9), Shift-Tab (or F8), F10  A Tab will scan the filename 
  103.                 (which may include the wildcard characters at or immediately to 
  104.                 the left of the cursor position, and replaces it with the first 
  105.                 matching filename.  Pressing Tab again replaces it with the 
  106.                 next matching filename; pressing F10 appends the next matching 
  107.                 filename at the current cursor position.  Pressing Shift-Tab 
  108.                 will retrieve the previous matching filename.  If you don't 
  109.                 enter a filename, Tab defaults to *.*.  If you don't enter an 
  110.                 extension, Tab appends a .*. 
  111.  PgUp           Popup a history window, showing those commands that match 
  112.                 characters already entered on the command line. 
  113.  Alt-255        (Hold down the Alt key and enter 255 on the numeric keypad.) 
  114.                 Accept the next character "as-is" from the keyboard and enter 
  115.                 it on the command line.  This allows you to enter characters 
  116.                 normally interpreted as editing keys (for example, Esc). To 
  117.                 enter the Alt-255 character itself into the line, you must type 
  118.                 it twice. 
  119.  ^ (caret)      "Escape" the next character (the default escape character for 
  120.                 4OS2 and CMD.EXE is the caret ^; it can be changed in 4OS2 with 
  121.                 the SETDOS command or in the 4OS2.INI file).  The escape 
  122.                 character forces the parser to ignore any special meaning of 
  123.                 the next character (for example, redirection characters).  Note 
  124.                 that 4OS2 will not recognize the escape character inside double 
  125.                 quotes (for compatibility with CMD.EXE). Escaping the following 
  126.                 characters will insert the specified control code: 
  127.                   b  bell (ASCII 7) 
  128.                   e  escape (ASCII 27) 
  129.                   f  form feed (ASCII 12) 
  130.                   n  line feed (ASCII 10) 
  131.                   r  carriage return (ASCII 13) 
  132.                   t  tab (ASCII 9) 
  133.  
  134.  The following keys have special meaning when entered from inside the popup 
  135.  history and directory windows.  The history list in a window is not circular 
  136.  as it is at the command line; scrolling and paging stop at the beginning or 
  137.  end of the history list. 
  138.  
  139.               Move the highlight up one line. 
  140.               Move the highlight down one line. 
  141.  PgUp          Move up one page. 
  142.  PgDn          Move down one page. 
  143.  Home          Move to the first line in the list. 
  144.  End           Move to the last line in the list. 
  145.  Enter         Execute the highlighted command (history window) or change to 
  146.                the highlighted directory (directory window). 
  147.  ^Enter        Close the window and move the highlighted command to the prompt 
  148.                for editing (history window only). 
  149.  Esc           Close the window and return to the previous command line at the 
  150.                prompt. 
  151.  ^C            Close the window, abort any partially entered command line, and 
  152.                redisplay the prompt. 
  153.  
  154.  Most of the command line and popup window keys, as well as the popup window 
  155.  location and size, can be redefined in the 4OS2.INI initialization file. 
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 2.3. 4OS2 Internal Variables ΓòÉΓòÉΓòÉ
  159.  
  160. Environment variables are referenced in a command by starting the variable name 
  161. with a percent sign (%).  (If you want to enter a percent sign without 
  162. referring to a variable, use two percent signs (%%).)  An environment variable 
  163. name is terminated by either another percent sign, or by an invalid character 
  164. (see below).  To pass a variable name (instead of the value) to a command (for 
  165. example, in INKEY or INPUT), you must precede it with two percent signs. 
  166.  
  167. Environment variable names may be composed of any alphanumeric character, plus 
  168. the underscore (_), and $ characters.  In addition to the standard variable 
  169. name characters, you can force 4OS2 to accept any sequence of characters as a 
  170. valid variable name by enclosing them in square brackets. For example, %[AB##1] 
  171. refers to an environment variable named AB##1. 
  172.  
  173. Batch file variables are only active inside a batch file.  They are referenced 
  174. as %0 to %127, and expand to the matching argument on the command line that 
  175. started the batch file.  The parameter %n$ is a special case, and expands to 
  176. all arguments in the command line tail, starting at argument number n.  If n is 
  177. not specified, it defaults to 1 (so %$ will expand to all arguments in the 
  178. command line tail). 
  179.  
  180. There are some variable names that have special meanings in 4OS2.  Only CDPATH, 
  181. CMDLINE, and PATH are actually stored in the environment; the remainder are 
  182. internal to 4OS2, and cannot be viewed or modified with SET or ESET.  (The 
  183. internal variable names are checked after variable expansion, so they can be 
  184. overridden by creating an environment variable of the same name.) 
  185.  
  186.  %#  returns the number of command line arguments in a batch file. 
  187.  %?  returns the exit code of the previous external command. 
  188.  %_? returns the exit code of the previous internal command.  (Save this value 
  189.      immediately; it is overwritten by the next internal command.) 
  190.  %CDPATH tells 4OS2 where to search for directories names specified by a CD or 
  191.      CDD command.  4OS2 will append the specified directory name to each 
  192.      directory in CDPATH and attempt to change to that directory. If you have 
  193.      already have a CDPATH environment variable, you can use %_CDPATH instead 
  194.      for the directory search. 
  195.  %CMDLINE is the fully expanded 299-character command line for the external 
  196.      command.  You can access it from an external program by searching the 
  197.      environment. 
  198.  %COLORDIR is the "directory colorization" variable.  See DIR for details on 
  199.      the COLORDIR format. 
  200.  %PATH tells 4OS2 where to search for executable files: .COM, .EXE, .BTM, and 
  201.      .CMD (and .BAT in OS/2 2.0), in that order, not found in the current 
  202.      directory.  Some applications also use the PATH variable to find their 
  203.      files. 
  204.  %_4VER returns the 4OS2 version number (for example, 1.0). 
  205.  %_ANSI is 1 if ANSI is active (4OS2 always enables ANSI). 
  206.  %_BATCH is the current batch nesting level (0 if not in a batch file). 
  207.  %_BG is a string containing the screen background color at the current cursor 
  208.      position. 
  209.  %_BOOT returns the boot disk (for example, C). 
  210.  %_CODEPAGE is the current code page number. 
  211.  %_COLUMN is the current cursor column. 
  212.  %_COLUMNS is the current number of screen columns. 
  213.  %_CPU is the cpu type (286, 386, or 486). 
  214.  %_CWD is the current directory in the format d:\pathname. 
  215.  %_CWDS has the same value as CWD, except it ensures the pathname ends  in a 
  216.      backslash (\). 
  217.  %_CWP is the current directory in the format \pathname. 
  218.  %_CWPS has the same value as CWP, except it ensures the pathname ends in a 
  219.      backslash (\). 
  220.  %_DATE contains the current system date, in the format mm-dd-yy (U.S.), 
  221.      dd-mm-yy (Europe), or yy-mm-dd (Japan). 
  222.  %_DISK is the current disk (for example, C). 
  223.  %_DOS is the operating system type (DOS or OS2).  This is useful if you have 
  224.      .BTM files running in both modes. 
  225.  %_DOSVER is the current OS/2 version (for example, 2.0). 
  226.  %_DOW is the current day (Mon, Tue, Wed, etc.). 
  227.  %_FG is a string containing the screen foreground color at the current cursor 
  228.      position. 
  229.  %_LASTDISK returns the last disk on the system (A: - Z:). 
  230.  %_MONITOR is the monitor type (MONO or COLOR). 
  231.  %_MOUSE returns 1 if a mouse is installed. 
  232.  %_NDP is the coprocessor type (0 - no coprocessor; 287 - 80287; 387 - 80387 or 
  233.      80486). 
  234.  %_PID is the process ID for 4OS2. 
  235.  %_PPID is the parent process ID (for the process that started 4OS2). 
  236.  %_PTYPE is the process type (FS - full screen; AVIO - Windowed; PM - 
  237.      Presentation manager; DT - detached). 
  238.  %_ROW is the current cursor row. 
  239.  %_ROWS is the current number of screen rows. 
  240.  %_SHELL is the current shell nesting level for that session.  The first copy 
  241.      of 4OS2 started in a session is shell 0. 
  242.  %_SID is the session ID. 
  243.  %_TIME contains the current system time in the format hh:mm:ss.  The separator 
  244.      character may vary depending upon your country information. 
  245.  %_TRANSIENT returns a 1 if the current shell is transient (started with a /C). 
  246.  %_VIDEO is the video card type (MONO, CGA, EGA, VGA, XGA, 8514, and IA/A). 
  247.  
  248.  
  249. ΓòÉΓòÉΓòÉ 2.4. 4OS2 Variable Functions ΓòÉΓòÉΓòÉ
  250.  
  251. Variable Functions are pseudo-variables that take one or more arguments (which 
  252. can themselves be environment variables or variable functions), and return a 
  253. value.  The variable function name must be preceded by an %@ (%@eval, %@len, 
  254. etc.).  All variable functions must have square brackets enclosing their 
  255. argument(s). 
  256.  
  257. Some functions return the number of bytes, kilobytes, or megabytes based on a 
  258. "b|k|m" argument: 
  259.  
  260.     b     bytes 
  261.     k     bytes / 1000 
  262.     K     kilobytes (bytes / 1024) 
  263.     m     bytes / 1,000,000 
  264.     M     megabytes (bytes / 1,048,576) 
  265.  
  266.  %@ALIAS[name] returns the alias argument for the specified name. 
  267.  %@ASCII[c] returns the ASCII value of the specified character. 
  268.  %@ATTRIB[filename,attrib] returns a 1 if the specified file has the matching 
  269.      attribute(s).  The attributes (other than N) can be combined; ATTRIB will 
  270.      only return a 1 if _all_ the attributes match.  The attributes are: 
  271.        N  Normal (no attribute bits set) 
  272.        R  Read-only 
  273.        H  Hidden 
  274.        S  System 
  275.        D  Directory 
  276.        A  Archive 
  277.  %@CHAR[n] returns the character for the specified ASCII value. 
  278.  %@DATE[mm/dd/yy] returns the number of days since 1/1/80 for the specified 
  279.      date.  DATE will use the date format mandated by your country code 
  280.      (dd/mm/yy in Europe; yy/mm/dd in Japan). 
  281.  %@DESCRIPT[filename] returns the file's description. 
  282.  %@DEVICE[name] returns a 1 if the specified name is a character device. 
  283.  %@DISKFREE[d:,b|k|m] returns the free disk space for the specified drive, in 
  284.      bytes, kilobytes, or megabytes. 
  285.  %@DISKTOTAL[d:,b|k|m] returns the total disk space for the specified drive, in 
  286.      bytes, kilobytes, or megabytes. 
  287.  %@DISKUSED[d:,b|k|m] returns the disk space used on the specified drive, in 
  288.      bytes, kilobytes, or megabytes. 
  289.  %@DOSMEM[b|k|m] returns the largest free OS/2 memory block in bytes, 
  290.      kilobytes, or megabytes. 
  291.  %@EVAL[expression] evaluates an arithmetic expression.  It supports addition 
  292.      (+), subtraction (-), multiplication (*), division (/), and modulo (%%). 
  293.      The expression can contain environment variables, including other variable 
  294.      functions.  EVAL supports commas and decimal places; the maximum size is 
  295.      16.8 (16 integer and 8 decimal places).  EVAL strips leading and trailing 
  296.      zeros from the result. 
  297.  %@EXEC[command] executes the command and returns its exit code.  The command 
  298.      can be an alias, an internal 4OS2 command, or an external program or batch 
  299.      file.  This is a back door entry to 4OS2 command processing -- use with 
  300.      caution! 
  301.  %@EXETYPE[filename] returns the file's program type: 
  302.      UNKNOWN  Unknown type 
  303.      FS  Full-screen OS/2 
  304.      AVIO  Windowable OS/2 
  305.      PM  Presentation manager OS/2 
  306.      DOS  MS-DOS (OS/2 2.0 only) 
  307.      WIN  Windows 3 (OS/2 2.0 only) 
  308.  %@EXT[filename] returns the file extension (without a leading period). 
  309.  %@FILEDATE[filename] returns the last modification date for the file, in the 
  310.      default country format (mm-dd-yy for US). 
  311.  %@FILESIZE[filename,b|k|m] returns the size of the file in bytes, kilobytes, 
  312.      or megabytes, or -1 if the file doesn't exist. 
  313.  %@FILETIME[filename] returns the last modification time for the file, in hh:mm 
  314.      format. 
  315.  %@FULL[filename] returns the fully qualified path name. 
  316.  %@FSTYPE[d:] returns the drive's file system type (for example, FAT  or HPFS). 
  317.  %@INDEX[string1,string2] returns the position of string2 within string1, or -1 
  318.      if string2 is not found.  The first position in string1 is 0. 
  319.  %@INT[n] returns the integer part of "n".  See %@EVAL. 
  320.  %@LABEL[d:] returns the volume label of the specified disk. 
  321.  %@LEN[string] returns the length of the string. 
  322.  %@LINE[filename,n] returns line "n" from the specified file.  If you specify 
  323.      "CON" for the filename, it will read from standard input. 
  324.  %@LINES[filename] returns the number of lines in the specified file, base 0. 
  325.      If there are no lines, it returns -1. 
  326.  %@LOWER[string] returns the string converted to lower case. 
  327.  %@MAKEDATE[n] returns the date given the number of days since 1/1/80. 
  328.  %@MAKETIME[n] returns the time given the number of seconds since midnight. 
  329.  %@NAME[filename] returns the filename only (no path or extension). 
  330.  %@PATH[filename] returns the path only (including the trailing backslash). 
  331.  %@READSCR[row,column,length] returns the text on the screen at the specified 
  332.      row and column, for the specified length. 
  333.  %@READY[d:] returns a 1 if the specified drive is ready. 
  334.  %@REMOTE[d:] returns a 1 if the specified drive is remote (LAN). 
  335.  %@SEARCH[filename] searches for an executable file using the PATH environment 
  336.      variable, appending the extension if one wasn't specified. 
  337.  %@SELECT[filename,top,left,bottom,right,title] displays the file as a popup 
  338.      selection list.  If you press Enter, it returns the string highlighted by 
  339.      the selection bar; if you press Esc it returns an empty string. 
  340.  %@SUBSTR[string,start,length] returns a substring, starting at the position 
  341.      "start" and continuing for "length" characters.  If the length is 
  342.      negative, the start is relative to the right side.  If the length isn't 
  343.      specified, SUBSTR will return the remainder of the string.  For example, 
  344.      %@SUBSTR[%_time,0,2] gets the current time and extracts the hour.  If the 
  345.      string includes commas it must be quoted with double quotes or single 
  346.      back-quotes (" or `). 
  347.  %@TIME[hh:mm:ss] returns the number of seconds since midnight for the 
  348.      specified time.  The time must be in 24-hour format. 
  349.  %@UNIQUE[d:\path] returns a unique filename in the specified drive and path. 
  350.  %@UPPER[string] returns the string converted to upper case. 
  351.  %@WORD[n,string] returns the "nth" word in the string (base 0).  If "n" is 
  352.      negative, WORD starts from the end and counts backwards. 
  353.  
  354.  
  355. ΓòÉΓòÉΓòÉ 2.5. Redirection ΓòÉΓòÉΓòÉ
  356.  
  357. OS/2 assumes input comes from the keyboard and output goes to the display. The 
  358. keyboard is referred to as standard input, and the display is referred to as 
  359. standard output.  You can change the default standard input and standard output 
  360. by using the < and > symbols on the command line.  4OS2 also allows you to 
  361. redirect the standard error by appending an & character. 
  362.  
  363. To get standard input from a file instead of the keyboard: 
  364.  
  365.     < filename
  366.  
  367. To redirect standard output to a file: 
  368.  
  369.     > filename
  370.  
  371. To redirect standard output and standard error to a file: 
  372.  
  373.     >& filename
  374.  
  375. To redirect standard error only to a file: 
  376.  
  377.     >&> filename
  378.  
  379. To append standard output or standard error to a file, use ">>" in place of the 
  380. first >.  If NOCLOBBER is set, the file must exist before it can be appended to 
  381. (unless overridden by a !).  Otherwise, 4OS2 will create the file. 
  382.  
  383. 4OS2 also supports the OS/2 CMD.EXE syntax: 
  384.  
  385.     n>
  386.  
  387. and 
  388.  
  389.     >n
  390.  
  391. where n is a digit from 0 to 9.  0, 1, and 2 are predefined by OS/2 standard 
  392. input, standard output, and standard error respectively; 3 through 9 can be 
  393. defined by applications. 
  394.  
  395. To send the standard output of "cmd1" to the standard input of "cmd2" (a 
  396. "pipe"): 
  397.  
  398.     cmd1 | cmd2
  399.  
  400. To send the standard output and standard error of "cmd1" to the standard input 
  401. of "cmd2": 
  402.  
  403.     cmd1 |& cmd2
  404.  
  405. Unlike 4DOS, which creates a temporary file for pipes, 4OS2 connects a pipe 
  406. directly to a secondary process; both processes execute simultaneously. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 2.6. Command Grouping ΓòÉΓòÉΓòÉ
  410.  
  411. Command grouping allows you to logically group a set of commands together by 
  412. enclosing them with parentheses.  For example, this grouping: 
  413.  
  414.     (global /iq echo %_cwd) > dirlist
  415.  
  416. allows you to redirect all output from GLOBAL to the specified file.  The 
  417. following command will take the output of DIR and TYPE, sort the whole mess, 
  418. and save it in the file AZ: 
  419.  
  420.     (dir *.com & type autoexec.bat) | sort > AZ
  421.  
  422. To group commands, the first character of the command must begin with a (  Note 
  423. that if you have a close paren ) in a filename, you'll need to escape it to 
  424. keep the parser from assuming it's the end of the command group. 
  425.  
  426. You can also use command grouping to split commands over several lines. For 
  427. example: 
  428.  
  429.     for %x in (*.c) do (
  430.         echo %x
  431.         dir *.c
  432.     )
  433.  
  434. If you enter a command group on the command line without a close paren, 4OS2 
  435. will prompt you with More? for the remainder of the line. 
  436.  
  437.  
  438. ΓòÉΓòÉΓòÉ 2.7. Wildcards ΓòÉΓòÉΓòÉ
  439.  
  440. Wildcards let you specify a file or group of files by typing a partial 
  441. filename.  Most internal commands accept filenames with wildcards anywhere a 
  442. full filename can be used.  4OS2 recognizes 3 wildcard types: the asterisk *, 
  443. the question mark ?, and the square brackets [ ].  You can combine various 
  444. wildcard types in a single filename.  Note that the 4OS2 wildcard extensions 
  445. may not be interpreted properly by external programs, so when passing file 
  446. names to external programs you should use the traditional wildcard syntax. 
  447.  
  448. A * in a filename means "any zero or more characters in this position."  You 
  449. can use both leading and trailing asterisks. For example, to get a directory of 
  450. all files beginning with "ab": 
  451.  
  452.     dir ab*.*
  453.  
  454. To get a directory of all files with an "ab" anywhere in the filename: 
  455.  
  456.     dir *ab*.*
  457.  
  458. A ? matches any single filename character.  A ? doesn't require that a 
  459. character exist if it's at the end of the filename or extension. 
  460.  
  461. A [ ] acts like a ? (match any single character), except it requires a 
  462. character to be in that position, and it allows you to specify the acceptable 
  463. characters, and/or exclude specific characters.  If you enter a ! as the first 
  464. character following the left bracket, the test is reversed (only return names 
  465. that DON'T match).  If you specify several characters (i.e., [abc]) only those 
  466. filenames will be returned that have any of those characters in the specified 
  467. position.  If you separate two characters with a - only those filenames will be 
  468. returned that have a character equal to or greater than the first character, 
  469. and less than or equal to the second character. 
  470.  
  471. For example, to get a directory of all filenames with either a "p" or "q" as 
  472. the first letter of the filename: 
  473.  
  474.     dir [pq]*.*
  475.  
  476. To get a directory of all filenames beginning with a number from 1 to 6, or the 
  477. letters "a" or "b", and ending with a "9": 
  478.  
  479.     dir [1-6ab]*[9].*
  480.  
  481. To get a directory of all filenames that don't begin with a digit: 
  482.  
  483.     dir [!0-9]*.*
  484.  
  485.  
  486. ΓòÉΓòÉΓòÉ 2.8. 4OS2 Initialization File (4OS2.INI) ΓòÉΓòÉΓòÉ
  487.  
  488. Format 
  489.  
  490. The 4OS2.INI file is an ASCII file containing directives to control the 
  491. configuration of 4OS2 in primary and secondary shells.  Blank lines are ignored 
  492. and can be used to separate groups of directives.  You can place comments in 
  493. the file by beginning a line with a semicolon (;). You can also place comments 
  494. at the end of any line except one containing a text string value by entering at 
  495. least one space or tab after the value, a semicolon, and your comment. 
  496.  
  497. The file has two sections, identified by a name in square brackets on a line by 
  498. itself.  The section names are: 
  499.  
  500. [Primary]:  Directives in this section will be used when 4OS2 is running as the 
  501. primary shell (i.e., when a session is started). 
  502.  
  503. [Secondary]:  Directives in this section are used in secondary shells only 
  504. (i.e., a second invocation of 4OS2 within the same session), and override any 
  505. corresponding primary shell settings. 
  506.  
  507. Lines before a section name are used in both primary and secondary shells. 
  508.  
  509. Location of 4OS2.INI 
  510.  
  511. When 4OS2 is loaded, whether as the primary or secondary shell, it searches 
  512. for: 
  513.  
  514. * The file specified in any "@d:\path\inifile" option in the Parameters field 
  515. for the session (specified under Program Properties in OS/2 1.x or in the 
  516. Settings window in OS/2 2.0). 
  517.  
  518. * The file 4OS2.INI in the directory where 4OS2.EXE is stored. 
  519.  
  520. * The file 4OS2.INI in the root directory of the drive where 4OS2 is stored. 
  521.  
  522. Directives in 4OS2.INI are divided into  Initialization,  Configuration, 
  523. Color,  and Key Mapping directives. 
  524.  
  525.  
  526. ΓòÉΓòÉΓòÉ 2.8.1. Initialization Directives ΓòÉΓòÉΓòÉ
  527.  
  528. These directives control how 4OS2 starts and where it looks for its files. 
  529.  
  530.  4StartPath= Path:  Sets the drive and directory where 4OS2 will look for the 
  531.      4START and 4EXIT batch files. 
  532.  History= nnnn (1024):  Sets the history list size (in bytes).  The range is 
  533.      512 to 8192 bytes. 
  534.  LocalLists= Yes | NO:  "Yes" tells 4OS2 to create local alias and history 
  535.      lists for this session.  "No" causes 4OS2 to use the global alias and 
  536.      history lists shared by all sessions. 
  537.  LogName= File (none):  Sets the log file name and/or path.  If only a path is 
  538.      given, 4OS2 will use the default log file name (4OS2LOG).  Using LogName 
  539.      does not turn logging on, you must still use LOG ON to do so. 
  540.  PauseOnError= YES | No:  "Yes" tells 4OS2 to pause with the message "Error in 
  541.      4OS2.INI, press any key to continue processing" after displaying any error 
  542.      message related to a specific line in the 4OS2.INI file.  "No" continues 
  543.      processing with no pause after an error message is displayed. 
  544.  
  545.  
  546. ΓòÉΓòÉΓòÉ 2.8.2. Configuration Directives ΓòÉΓòÉΓòÉ
  547.  
  548. These directives control the way that 4OS2 operates.  Some can be changed with 
  549. the SETDOS command while 4OS2 is running. 
  550.  
  551.  BatchEcho= YES | No:  Sets the default batch ECHO mode.  Also see SETDOS /V. 
  552.  BeepFreq= nnnn (440):  Sets the default BEEP command frequency in Hz. To 
  553.      disable all 4OS2 error beeps set this or BeepLength to 0; 
  554.  BeepLength= nnnn (2):  Sets the default BEEP length in system clock ticks 
  555.      (approximately 1/18 of a second per tick). 
  556.  CursorIns= nnnn (100):  Sets the percentage of the character cell filled by 
  557.      the 4OS2 cursor in insert mode.  Also see SETDOS /S. 
  558.  CursorOver= nnnn (10):  Sets the percentage of the character cell filled by 
  559.      the 4OS2 cursor in overtype mode.  Also see SETDOS /S. 
  560.  CommandSep= c (&):  This is the character used to separate multiple commands 
  561.      on the same line.  Also see SETDOS /C. 
  562.  DescriptionMax= nnnn (40):  Sets the maximum description length; the range is 
  563.      20 - 120 characters. 
  564.  EditMode= Insert | OVERSTRIKE:  Lets you start the command line editor in 
  565.      either insert or overstrike mode.  Also see SETDOS /M. 
  566.  EscapeChar= c (^):  Sets the character used to suppress the normal meaning of 
  567.      the following character.  Also see SETDOS /E. 
  568.  HelpBook= String (4OS2+CMDREF):  Tells the internal 4OS2 help command (F1 or 
  569.      HELP) which .INF files to use.  Filenames are separated by a +. Files 
  570.      should be in one of the directories specified by the BOOKSHELF environment 
  571.      variable. 
  572.  HistMin= nnnn (0):  Sets the minimum command length to save in the history 
  573.      list.  0 saves all commands, 300 disables all history saves. 
  574.  HistWinColor= Color:  Sets the default colors for the command line history 
  575.      window. 
  576.  HistWinHeight= nn (10):  Sets the height of the command line history window in 
  577.      lines, including the border. 
  578.  HistWinLeft= nn (50):  Sets the horizontal position of the left side of the 
  579.      command line history window.  The left edge of the screen is 0. 
  580.  HistWinTop= nn (0):  Sets the vertical position of the top of the command line 
  581.      history window.  The top of the screen is 0. 
  582.  HistWinWidth= nn (30):  Sets the width of the command line history window in 
  583.      characters, including the border. 
  584.  NoClobber= Yes | NO:  If set to Yes, prevents standard output redirection from 
  585.      overwriting an existing file, and requires the output file already exist 
  586.      for append redirection.  Also see SETDOS /N. 
  587.  ScreenRows= nnnn:  Sets the number of screen rows used by the video display. 
  588.      Normally, 4OS2 detects the screen size automatically, but if you have a 
  589.      non-standard display you may need to set it explicitly. Also see SETDOS 
  590.      /R. 
  591.  UpperCase= Yes | NO:  "Yes" specifies filenames should be displayed in the 
  592.      traditional upper-case by internal commands like COPY and DIR.  "No" 
  593.      allows the normal 4OS2 lower-case style.  Also see SETDOS /U. 
  594.  
  595.  
  596. ΓòÉΓòÉΓòÉ 2.8.3. Color Directives ΓòÉΓòÉΓòÉ
  597.  
  598. These directives control the colors that 4OS2 uses for its displays.  The color 
  599. format is: 
  600.  
  601.     [BRIght] [BLInk] fg ON bg [BORder bc]
  602.  
  603. Where fg is the foreground color, bg is the background color, and bc is the 
  604. border color.  The color names are: 
  605.  
  606.     Black         Blue          Green        Red
  607.     Magenta       Cyan          Yellow       White
  608.  
  609. The color names and the keywords BRIGHT, BLINK, and BORDER can be shortened to 
  610. three letters. 
  611.  
  612.  ColorDir= ext1 ext2 ...:colora;ext3 ext4 ... :colorb ... (none):  Sets the 
  613.      directory colors.  The format is the same as that used for the COLORDIR 
  614.      environment variable (see 4OS2 Internal Variables). 
  615.  ListColors= Color:  Sets the colors used by the LIST and SELECT commands. 
  616.  StdColors= Color:  Sets the standard colors to be used when CLS is used 
  617.      without a color specification, and for LIST and SELECT if ListColors is 
  618.      not used. 
  619.  
  620.  
  621. ΓòÉΓòÉΓòÉ 2.8.4. Key Mapping Directives ΓòÉΓòÉΓòÉ
  622.  
  623. The directives in this group allow you to change the keys used for 4OS2 command 
  624. line editing and other internal functions.  They take effect only inside 4OS2 
  625. itself and do not affect other programs (including the help system).  4OS2 
  626. processes all command line editing key assignments before looking for keystroke 
  627. aliases.  For example, if you assign Shift-F1 to HELP and also assign Shift-F1 
  628. to a key alias, the key alias will be ignored.  (Use the "Normal" directives -- 
  629. NormalKey, NormalEditKey, etc. -- to disable the preassigned function for a key 
  630. so it can be used for a keystroke alias.) 
  631.  
  632. The format for a key name is:  [Prefix-]Keyname.  The prefix and key name must 
  633. be separated by a dash.  The prefix can be left out, or it can be any of the 
  634. following: 
  635.  
  636.     Alt     followed by A - Z, 0 - 9, F1 - F12, or Bksp
  637.     Ctrl    followed by A - Z, F1 - F12, Bksp, Enter,
  638.               Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  639.     Shift   followed by F1 - F12 or Tab.
  640.  
  641. The possible key names are: 
  642.  
  643.     A - Z       Esc         Up          PgUp
  644.     0 - 9       Bksp        Down        PgDn
  645.     F1 - F12    Tab         Left        Home
  646.     Ins         Enter       Right       End
  647.     Del
  648.  
  649. General Input Keys 
  650.  
  651. These directives are effective whenever 4OS2 requests input from the keyboard, 
  652. including command line editing and the DESCRIBE, ESET, INPUT, LIST, and SELECT 
  653. commands. (Scrolling through the command history list is controlled by NextHist 
  654. and PrevHist (see below), not by the Up and Down directives below.) 
  655.  
  656.  Backspace= Key (Bksp):  Deletes the character to the left of the cursor. 
  657.  BeginLine= Key (Home):  Moves the cursor to the beginning of the line. 
  658.  Del = Key (Del):  Deletes the character at the cursor. 
  659.  DelToBeginning= Key (Ctrl-Home):  Deletes from the cursor to the start of the 
  660.      line. 
  661.  DelToEnd= Key (Ctrl-End):  Deletes from the cursor to the end of the line. 
  662.  DelWordLeft= Key (Ctrl-L):  Deletes the word to the left of the cursor. 
  663.  DelWordRight= Key (Ctrl-R, Ctrl-Bksp):  Deletes the word to the right of the 
  664.      cursor. 
  665.  Down= Key (Down):  Scrolls the display down one line in LIST; moves the cursor 
  666.      down one line in SELECT and in the command history window. 
  667.  EndLine= Key (End):  Moves the cursor to the end of the line. 
  668.  EraseLine= Key (Esc):  Deletes the entire line. 
  669.  ExecLine= Key (Enter):  Executes or accepts a line. 
  670.  Ins = Key (Ins):  Toggles insert / overstrike mode during line editing. 
  671.  Left= Key (Left):  Moves the cursor left one character; moves the display left 
  672.      8 columns in LIST. 
  673.  NormalKey= Key (none):  Deassigns a general input key in order to disable the 
  674.      usual meaning of the key within 4OS2 and / or make it available for 
  675.      keystroke aliases.  This will cause 4OS2 to treat the keystroke as a 
  676.      "normal" key with no special function. 
  677.  Right= Key (Right):  Moves the cursor right one character; scrolls the display 
  678.      right 8 columns in LIST. 
  679.  Up  = Key (Up):  Scrolls the display up one line in LIST; moves the cursor up 
  680.      one line in SELECT and in the command history window. 
  681.  WordLeft= Key (Ctrl-Left):  Moves the cursor left one word; scrolls the 
  682.      display left 40 columns in LIST. 
  683.  WordRight= Key (Ctrl-Right):  Moves the cursor right one word; scrolls the 
  684.      display right 40 columns in LIST. 
  685.  
  686.  Command Line Editing Keys 
  687.  
  688.  The following directives apply only to command line editing (see Command Line 
  689.  Editing).  They are only effective at the 4OS2 prompt. 
  690.  
  691.  AddFile= Key (F10):  Keeps the current filename completion entry and inserts 
  692.      the next matching name. 
  693.  CommandEscape= Key (Alt-255):  Allows direct entry of a keystroke that would 
  694.      normally be interpreted as an editor command. 
  695.  DelHistory= Key (Ctrl-D):  Deletes the displayed history list entry and 
  696.      displays the previous entry. 
  697.  EndHistory= Key (Ctrl-E):  Displays the last history list entry. 
  698.  Help= Key (F1):  Invokes the 4OS2 HELP facility. 
  699.  NextFile= Key (F9, Tab):  Gets the next matching filename. 
  700.  NextHistory= Key (Down):  Recalls the next command from the command history. 
  701.  NormalEditKey= Key (none):  Deassigns a command line editing key in order to 
  702.      disable the usual meaning of the key while editing a command line and / or 
  703.      make it available for keystroke aliases.  This will cause 4OS2 to treat 
  704.      the keystroke as a "normal" key with no special function. 
  705.  PrevFile= Key (F8, Shift-Tab):  Gets the previous matching filename. 
  706.  PrevHistory= Key (Up):  Recalls the previous command from the command history. 
  707.  SaveHistory= Key (Ctrl-K):  Saves the command line in the history list without 
  708.      executing it. 
  709.  
  710.  History Window Keys 
  711.  
  712.  HistWinBegin= Key (Ctrl-PgUp):  Moves to the first line of the history when in 
  713.      the history window. 
  714.  HistWinEdit= Key (Ctrl-Enter):  Moves a line from the history window to the 
  715.      prompt for editing. 
  716.  HistWinEnd= Key (Ctrl-PgDn):  Moves to the last line of the history when in 
  717.      the history window. 
  718.  HistWinExec= Key (Enter):  Executes the selected line in the history window. 
  719.  HistWinOpen= Key (PgUp):  Brings up the history window while at the command 
  720.      line. 
  721.  NormalHWinKey= Key (none):  Deassigns a history window key in order to disable 
  722.      the usual meaning of the key within the history window.  This will cause 
  723.      4OS2 to treat the keystroke as a "normal" key with no special function. 
  724.  
  725.  LIST Keys 
  726.  
  727.  These directives control the keystrokes used within the LIST command. 
  728.  
  729.  ListFind= Key (F):  Prompts and searches for a string. 
  730.  ListHighBit= Key (H):  Toggles LIST's "strip high bit" option, which can aid 
  731.      in displaying files from certain word processors. 
  732.  ListNext= Key (N):  Finds the next matching string. 
  733.  ListPrint= Key (P):  Prints the file on LPT1. 
  734.  ListWrap= Key (W):  Toggles LIST's wrap option on and off.  The wrap option 
  735.      wraps text at the right margin. 
  736.  NormalListKey= Key (none):  Deassigns a LIST key in order to disable the usual 
  737.      meaning of the key within LIST.  This will cause 4OS2 to treat the 
  738.      keystroke as a "normal" key with no special function. 
  739.  
  740.  
  741. ΓòÉΓòÉΓòÉ 2.8.5. Examples ΓòÉΓòÉΓòÉ
  742.  
  743. The following example gives you an idea of the types of things that can be done 
  744. with the 4OS2.INI file.  The comments on each directive explain what it does. 
  745.  
  746.     History = 1024         ; set history size
  747.     BatchEcho = No         ; default is ECHO OFF
  748.     EditMode = Insert      ; editor in insert mode
  749.     CursorO = 100          ; overstrike cursor 100%
  750.     CursorI = 10           ; insert cursor 10%
  751.     ListFind = S           ; use "S" to search in LIST
  752.     ListNext = A           ; use "A" to search again in LIST
  753.  
  754.  
  755. ΓòÉΓòÉΓòÉ 3. 4OS2 Commands ΓòÉΓòÉΓòÉ
  756.  
  757. The 4OS2 commands are described in detail in this section.  The commands are 
  758. arranged alphabetically, and each includes examples to help you learn to use 
  759. the commands. 
  760.  
  761.  
  762. ΓòÉΓòÉΓòÉ 3.1. 4OS2 - 4OS2 command processor ΓòÉΓòÉΓòÉ
  763.  
  764. SYNTAX     (External OS/2) 
  765.  
  766. [[d:]path]4OS2 [/C /K /L /Q /S][@inifile][command ...]
  767.  
  768. PURPOSE 
  769.  
  770. Start a new copy of the 4OS2 command processor. 
  771.  
  772. COMMENTS 
  773.  
  774. 4OS2 replaces CMD.EXE, the default command processor provided with OS/2. The 
  775. 4OS2 options are: 
  776.  
  777.     /C            Execute the command following the /C, and automatically 
  778.                   return to the previous command processor. 
  779.  
  780.     /K            Execute the command following the /K, but do not return to 
  781.                   the previous command processor.  4OS2 defaults to /K if /C is 
  782.                   not specified. 
  783.  
  784.     /L            Use local alias and history lists.  4OS2 normally shares its 
  785.                   alias and history lists across all sessions; specifying /L 
  786.                   shares them only among processes in the same session. 
  787.  
  788.     /Q            Don't echo redirected standard input. 
  789.  
  790.     /S            Don't install a ^C signal handler (^C will be ignored). 
  791.  
  792.     @inifile      The 4OS2.INI file specification. 
  793.  
  794.     command       The command to execute. 
  795.  
  796.  EXAMPLES 
  797.  
  798.  Start 4OS2 with local alias and history lists, using the 4OS2.INI file in 
  799.  D:\4OS2: 
  800.  
  801.       4OS2 @D:\4OS2\4OS2.INI /L
  802.  
  803.  
  804. ΓòÉΓòÉΓòÉ 3.2. ? - Display internal commands ΓòÉΓòÉΓòÉ
  805.  
  806. SYNTAX     (Internal 4OS2) 
  807.  
  808. ?
  809.  
  810. PURPOSE 
  811.  
  812. Display the internal commands.  Commands disabled with SETDOS /I will not be 
  813. displayed. 
  814.  
  815.  
  816. ΓòÉΓòÉΓòÉ 3.3. ALIAS - Display/Set aliases ΓòÉΓòÉΓòÉ
  817.  
  818. SYNTAX     (Internal 4OS2) 
  819.  
  820. ALIAS [/P] [/R [d:][path]filename...] [name[=][value]]
  821.  
  822. PURPOSE 
  823.  
  824. Load or display the alias list, or define name as a substitute for value. 
  825.  
  826. COMMENTS 
  827.  
  828. Aliases are useful as a means of executing a complex series of commands with a 
  829. few keystrokes.  Aliases can also be used as very fast in-memory batch files, 
  830. and will run much faster than disk-based batch files. 
  831.  
  832. 4OS2 supports two types of aliases; command aliases (where the alias is 
  833. substituted for the first argument on the command line), and "keystroke 
  834. aliases", where the command line editor will immediately substitute the alias 
  835. when the key is pressed. 
  836.  
  837. Keystroke alias names are composed of an @ followed by the key name.  You can 
  838. add a carriage return to a key alias by ending the alias with a ^^r (^ is the 
  839. 4OS2 escape character) if defined at the command line or in a batch file, or ^r 
  840. if defined in an ALIAS /R file.  The valid key names are the same as those 
  841. listed in the section on Key Mapping Directives in KEYCODES. 
  842.  
  843. If you only specify "name", ALIAS displays the current alias value for "name". 
  844. Otherwise, ALIAS assigns the command(s) in "value" to "name". "Name" can now be 
  845. used as if it were a built-in or external command.  If you don't specify any 
  846. arguments, ALIAS displays the current alias list. 
  847.  
  848. "Name" is limited to no more than 80 characters, and "value" to no more than 
  849. 255 characters. 
  850.  
  851. The ALIAS options are: 
  852.  
  853.     /P      Pause after displaying each page and wait for a key to be pressed. 
  854.  
  855.     /R      Load an alias list from a file.  This is much faster than loading 
  856.             aliases from a batch file.  The file is in the same format as the 
  857.             ALIAS display, so ALIAS /R can accept as input a file generated by 
  858.             redirecting ALIAS output.  You can add comments to an alias file by 
  859.             starting the comment line with a colon (:). 
  860.  
  861.  For example, the following commands will save the aliases to a file, and then 
  862.  reload them from that file: 
  863.  
  864.       alias > alist
  865.       alias /r alist
  866.  
  867.  (You can load aliases from multiple files by listing all the filenames after 
  868.  the /R.) 
  869.  
  870.  When defining aliases at the command line, back quotes must be used around the 
  871.  alias arguments that contain multiple commands or variable references (%2, 
  872.  %2$, etc.) to prevent premature expansion.  Back quotes should NOT be used 
  873.  when defining aliases in a file to be read with ALIAS /R. 
  874.  
  875.  Aliases may be nested; i.e., an alias can refer to another alias, but they 
  876.  cannot refer back to themselves (a=b=a).  You can stop alias expansion by 
  877.  prefacing the alias with an asterisk (*).  This also allows an alias to refer 
  878.  to a command of the same name (see below for an example). 
  879.  
  880.  Alias names can be truncated by including an asterisk (*) in the name. 
  881.  
  882.  To edit an alias, use ESET; to remove an alias, use UNALIAS. 
  883.  
  884.  For more information on aliases (including the use of variables), see the 
  885.  Aliases section in the printed manual, and the sample file ALIASES distributed 
  886.  with 4OS2. 
  887.  
  888.  See also ESET and UNALIAS. 
  889.  
  890.  EXAMPLES 
  891.  
  892.  Define D as an alias for DIR /AP: 
  893.  
  894.       alias d dir /ap
  895.  
  896.  Rename the LIST command to DISPLAY, and alias LIST to an external program : 
  897.  
  898.       alias display *list
  899.       alias list c:\util\list.com
  900.  
  901.  The following examples show the use of alias arguments: 
  902.  
  903.       alias zap `erase %$ & chkdsk & dir /w`
  904.       alias reverse `echo %5 %4 %3 %2 %1`
  905.  
  906.  The following keystroke alias will insert a "dir /2 /v /p " on the command 
  907.  line when the Alt-F1 key is pressed: 
  908.  
  909.       alias @Alt-F1 `dir /2 /v /p `
  910.  
  911.  The same alias set up to execute immediately when Alt-F1 is pressed. 
  912.  
  913.       alias @Alt-F1 `dir /2 /v /p^r`
  914.  
  915.  
  916. ΓòÉΓòÉΓòÉ 3.4. ATTRIB - Display/Set file attributes ΓòÉΓòÉΓòÉ
  917.  
  918. SYNTAX     (Internal 4OS2) 
  919.  
  920. ATTRIB [/D /Q /S -|+[AHRS]] [d:][path]filename...
  921.  
  922. PURPOSE 
  923.  
  924. Change the file or subdirectory attributes. 
  925.  
  926. COMMENTS 
  927.  
  928. The ATTRIB options are: 
  929.  
  930.     /D      Also modify subdirectory attributes 
  931.     /Q      Quiet mode - don't display filenames 
  932.     /S      Modify files in the current directory and its subdirectories 
  933.     +A      Set the archive attribute 
  934.     -A      Clear the archive attribute 
  935.     +H      Set the hidden attribute 
  936.     -H      Clear the hidden attribute 
  937.     +R      Set the read-only attribute 
  938.     -R      Clear the read-only attribute 
  939.     +S      Set the system file attribute 
  940.     -S      Clear the system file attribute 
  941.  
  942.  If you don't specify the /D option, ATTRIB only modifies file attributes. If 
  943.  you don't specify any attributes to change, ATTRIB displays the current file 
  944.  attributes.  You can also display the file attributes using the /T option in 
  945.  DIR. 
  946.  
  947.  ATTRIB will preserve the previous file attributes and change only the 
  948.  specified attributes.  New attribute values are allowed between filenames; 
  949.  otherwise ATTRIB uses the same attributes specified for the previous file(s). 
  950.  You cannot modify the directory or volume label attributes. 
  951.  
  952.  EXAMPLES 
  953.  
  954.  Set the read-only and hidden attributes for the file MEMO: 
  955.  
  956.       attrib +rh memo
  957.  
  958.  Set the archive attribute (file has been modified) for MEMO and change 
  959.  TEXT.COM to system and not modified: 
  960.  
  961.       attrib +a memo +s -a test.com
  962.  
  963.  
  964. ΓòÉΓòÉΓòÉ 3.5. BEEP - Beep the speaker ΓòÉΓòÉΓòÉ
  965.  
  966. SYNTAX     (Internal 4OS2) 
  967.  
  968. BEEP [frequency [duration] ...]
  969.  
  970. PURPOSE 
  971.  
  972. Beep the speaker. 
  973.  
  974. COMMENTS 
  975.  
  976. BEEP is normally used in batch files to signal that an operation has been 
  977. completed, or that the computer needs attention (for example, to change disks). 
  978. Because BEEP allows you to specify the frequency and duration, you can use it 
  979. to play simple music.  You can specify multiple frequency and duration pairs on 
  980. the command line. 
  981.  
  982. The frequency is specified in Hertz, and the duration in 1/18th second 
  983. intervals.  No sound will be generated for frequencies less than 20 Hz, 
  984. allowing you to insert short delays.  The default value for frequency is 440 
  985. Hz; the default value for duration is 2. 
  986.  
  987. The following table gives the frequency values for a five octave range (middle 
  988. C is 523 Hz): 
  989.  
  990.     ΓòöΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòñΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòù
  991.     Γòæ C      Γöé  131  Γöé  262  Γöé  523  Γöé  1046  Γöé  2093 Γòæ
  992.     Γòæ C#/Db  Γöé  139  Γöé  277  Γöé  554  Γöé  1108  Γöé  2217 Γòæ
  993.     Γòæ D      Γöé  147  Γöé  294  Γöé  587  Γöé  1175  Γöé  2349 Γòæ
  994.     Γòæ D#/Eb  Γöé  156  Γöé  311  Γöé  622  Γöé  1244  Γöé  2489 Γòæ
  995.     Γòæ E      Γöé  165  Γöé  330  Γöé  659  Γöé  1318  Γöé  2637 Γòæ
  996.     Γòæ F      Γöé  175  Γöé  349  Γöé  698  Γöé  1397  Γöé  2794 Γòæ
  997.     Γòæ F#/Gb  Γöé  185  Γöé  370  Γöé  740  Γöé  1480  Γöé  2960 Γòæ
  998.     Γòæ G      Γöé  196  Γöé  392  Γöé  784  Γöé  1568  Γöé  3136 Γòæ
  999.     Γòæ G#/Ab  Γöé  208  Γöé  415  Γöé  831  Γöé  1662  Γöé  3322 Γòæ
  1000.     Γòæ A      Γöé  220  Γöé  440  Γöé  880  Γöé  1760  Γöé  3520 Γòæ
  1001.     Γòæ A#/Bb  Γöé  233  Γöé  466  Γöé  932  Γöé  1866  Γöé  3729 Γòæ
  1002.     Γòæ B      Γöé  248  Γöé  494  Γöé  988  Γöé  1973  Γöé  3951 Γòæ
  1003.     ΓòÜΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòºΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓòÉΓò¥
  1004.  
  1005. EXAMPLES 
  1006.  
  1007. The following batch file fragment runs the program DEMO, plays a few notes, and 
  1008. waits for you to press a key: 
  1009.  
  1010.     demo
  1011.     beep 440 4 587 2 1040 6
  1012.     pause Finished with the demo - press a key to continue
  1013.  
  1014.  
  1015. ΓòÉΓòÉΓòÉ 3.6. CALL - Call a batch file ΓòÉΓòÉΓòÉ
  1016.  
  1017. SYNTAX     (Internal 4OS2) 
  1018.  
  1019. CALL [d:][path]filename
  1020.  
  1021. PURPOSE 
  1022.  
  1023. Call a secondary batch file. 
  1024.  
  1025. COMMENTS 
  1026.  
  1027. CALL allows batch files to call other batch files (batch file nesting) without 
  1028. invoking a secondary copy of the command processor.  The calling batch file is 
  1029. suspended while the called batch file runs.  When the called batch file 
  1030. finishes, the calling batch file resumes execution at the next command.  If you 
  1031. execute a batch file from another batch file without using CALL, the first 
  1032. batch file is terminated before the second one starts. 
  1033.  
  1034. The current ECHO state will be inherited by a called batch file. 
  1035.  
  1036. See also CANCEL and QUIT. 
  1037.  
  1038. EXAMPLES 
  1039.  
  1040. The following batch file fragment compares an input line to "wp" and calls a 
  1041. secondary batch file if it matches: 
  1042.  
  1043.     input Enter your choice:  %%option
  1044.     if "%option" == "wp" call wp
  1045.  
  1046.  
  1047. ΓòÉΓòÉΓòÉ 3.7. CANCEL - Quit all batch files ΓòÉΓòÉΓòÉ
  1048.  
  1049. SYNTAX     (Internal 4OS2) 
  1050.  
  1051. CANCEL [value]
  1052.  
  1053. PURPOSE 
  1054.  
  1055. Terminate batch processing. 
  1056.  
  1057. COMMENTS 
  1058.  
  1059. The CANCEL command will end all batch file processing, regardless of the batch 
  1060. nesting level.  (Use QUIT to end a nested batch file and return to the previous 
  1061. batch file.)  If you enter a value, CANCEL will set the ERRORLEVEL to that 
  1062. value.  The value also affects the internal variable %_?, and the conditional 
  1063. command separators && and ||. 
  1064.  
  1065. You can CANCEL at any point in a batch file. 
  1066.  
  1067. See also CALL and QUIT. 
  1068.  
  1069. EXAMPLES 
  1070.  
  1071. The following batch file fragment compares an input line to "end" and 
  1072. terminates all batch file processing if it matches: 
  1073.  
  1074.     input Enter your choice:  %%option
  1075.     if "%option" == "end" cancel
  1076.  
  1077.  
  1078. ΓòÉΓòÉΓòÉ 3.8. CD or CHDIR - Change directory ΓòÉΓòÉΓòÉ
  1079.  
  1080. SYNTAX     (Internal 4OS2) 
  1081.  
  1082. CD [[d:][pathname]
  1083. CHDIR [[d:][pathname]
  1084.  
  1085. PURPOSE 
  1086.  
  1087. Display or change the current directory. 
  1088.  
  1089. COMMENTS 
  1090.  
  1091. Entering CD with no argument or only a drive name will display the current 
  1092. directory.  Entering CD and a pathname will change the current directory. 
  1093.  
  1094. If CD can't change to the specified directory, it will look for the CDPATH (or 
  1095. _CDPATH) environment variable.  CD will append the specified directory name to 
  1096. each directory in CDPATH and attempt to change to that directory, until the 
  1097. first match or the end of the CDPATH argument. 
  1098.  
  1099. The previous directory is saved on each CD, and you can switch back to it with 
  1100. "CD -".  You can switch between two directories by repeatedly entering "CD -". 
  1101. Note that the saved directory is the same for both CD and CDD. 
  1102.  
  1103. You can change to the parent directory with "CD ..".  You can also go up one 
  1104. additional directory level with each additional ".".  For example, "CD ...." 
  1105. will go up three directory levels. 
  1106.  
  1107. Every disk drive on the system has its own current directory.  Specifying both 
  1108. a drive and a directory in the CD command will change the current directory on 
  1109. the specified drive, but will not change the default drive. Use CDD to change 
  1110. both the drive and directory. 
  1111.  
  1112. See also %CDPATH, CDD, and PUSHD. 
  1113.  
  1114. EXAMPLES 
  1115.  
  1116. Change to the subdirectory C:\FINANCE\MYFILES: 
  1117.  
  1118.     cd \finance\myfiles
  1119.  
  1120. Change the default directory on drive A: 
  1121.  
  1122.     cd a:\utility
  1123.  
  1124. Set the CDPATH environment variable and then CD to a directory called DOCS (CD 
  1125. will first attempt to change to DOCS in the current directory, then C:\DOCS, 
  1126. then C:\OS\DOCS, etc.): 
  1127.  
  1128.     set cdpath=c:\;c:\os;c:\util;c:\wp
  1129.     cd docs
  1130.  
  1131.  
  1132. ΓòÉΓòÉΓòÉ 3.9. CDD - Change disk and directory ΓòÉΓòÉΓòÉ
  1133.  
  1134. SYNTAX     (Internal 4OS2) 
  1135.  
  1136. CDD [d:]pathname
  1137.  
  1138. PURPOSE 
  1139.  
  1140. Change the current disk drive and directory. 
  1141.  
  1142. COMMENTS 
  1143.  
  1144. CDD is similar to CD, except it can also change the default disk drive. 
  1145.  
  1146. To start at the root directory, start the pathname with a backslash (\). To 
  1147. start at the parent directory, start the pathname with two periods (..). All 
  1148. other pathnames start at the current directory. 
  1149.  
  1150. If CDD can't change to the specified directory, it will look for the CDPATH (or 
  1151. _CDPATH) environment variable.  CDD will append the specified directory name to 
  1152. each directory in CDPATH and attempt to change to that directory, until the 
  1153. first match or the end of the CDPATH argument. 
  1154.  
  1155. The previous directory is saved on each CDD, and you can switch back to it with 
  1156. "CDD -".  You can switch between two directories by repeatedly entering "CDD 
  1157. -".  Note that the saved directory is the same for both CDD and CD. 
  1158.  
  1159. You can change to the parent directory with "CD ..".  You can also go up one 
  1160. additional directory level with each additional ".".  For example, "CD ...." 
  1161. will go up three directory levels. 
  1162.  
  1163. See also %CDPATH, CD and PUSHD. 
  1164.  
  1165. EXAMPLES 
  1166.  
  1167. Change to the subdirectory C:\WP: 
  1168.  
  1169.     cdd c:\wp
  1170.  
  1171. Set the CDPATH environment variable and then CDD to a directory called DOCS 
  1172. (CDD will first attempt to change to DOCS in the current directory, then 
  1173. C:\DOCS, then C:\OS\DOCS, etc.): 
  1174.  
  1175.     set cdpath=c:\;c:\os;c:\util;c:\wp
  1176.     cdd docs
  1177.  
  1178.  
  1179. ΓòÉΓòÉΓòÉ 3.10. CHCP - Change code page ΓòÉΓòÉΓòÉ
  1180.  
  1181. SYNTAX     (Internal 4OS2) 
  1182.  
  1183. CHCP [n]
  1184.  
  1185. PURPOSE 
  1186.  
  1187. Display or change the current system code page. 
  1188.  
  1189. COMMENTS 
  1190.  
  1191. Code page switching allows you to select different character sets for language 
  1192. support. 
  1193.  
  1194. Before using CHCP, you must have DEVINFO= and CODEPAGE= statements in 
  1195. CONFIG.SYS for the specified code page. 
  1196.  
  1197. CHCP accepts one of the two prepared system code pages.  An error message is 
  1198. displayed if a code page is selected that has not been prepared. 
  1199.  
  1200. Entering CHCP with no argument displays the active code page. 
  1201.  
  1202. The code pages supported by OS/2 are: 
  1203.  
  1204.     437     United States
  1205.     850     Multilingual (Latin I)
  1206.     852     Slavic (Latin II)
  1207.     860     Portuguese
  1208.     863     Canadian-French
  1209.     865     Nordic
  1210.  
  1211. See your OS/2 manual for more information on CHCP and code page switching. 
  1212.  
  1213. EXAMPLES 
  1214.  
  1215. Display the current code page: 
  1216.  
  1217.     chcp
  1218.  
  1219. Set the code page to multilingual: 
  1220.  
  1221.     chcp 850
  1222.  
  1223.  
  1224. ΓòÉΓòÉΓòÉ 3.11. CLS - Clear screen ΓòÉΓòÉΓòÉ
  1225.  
  1226. SYNTAX     (Internal 4OS2) 
  1227.  
  1228. CLS [[bright] [blink] fg ON bg [BORDER fg]]
  1229.  
  1230. PURPOSE 
  1231.  
  1232. Clear the video display, optionally to the specified colors. 
  1233.  
  1234. COMMENTS 
  1235.  
  1236. CLS clears the display and moves the cursor to the upper left corner.  fg is 
  1237. the foreground color, bg the background color.  Only the first three characters 
  1238. of the color name and attributes ("bright" and "blink") are required. 
  1239.  
  1240. The available colors are: 
  1241.  
  1242.     Black      Blue      Green      Red
  1243.     Magenta    Cyan      Yellow     White
  1244.  
  1245. CLS is normally used in batch files to clear the screen before displaying text. 
  1246.  
  1247. See also COLOR, SETDOS, and 4OS2.INI. 
  1248.  
  1249. EXAMPLES 
  1250.  
  1251. Clear the display: 
  1252.  
  1253.     cls
  1254.  
  1255. Clear the display to a blue background, and set white characters as the new 
  1256. default: 
  1257.  
  1258.     cls white on blue
  1259.  
  1260.  
  1261. ΓòÉΓòÉΓòÉ 3.12. COLOR - Set screen colors ΓòÉΓòÉΓòÉ
  1262.  
  1263. SYNTAX     (Internal 4OS2) 
  1264.  
  1265. COLOR [[bright] [blink] fg ON bg [BORDER fg]]
  1266.  
  1267. PURPOSE 
  1268.  
  1269. Set the screen display colors. 
  1270.  
  1271. COMMENTS 
  1272.  
  1273. fg is the foreground color, bg the background color.  Only the first three 
  1274. characters of the color name and attributes ("bright" and "blink") are 
  1275. required. 
  1276.  
  1277. The available colors are: 
  1278.  
  1279.     Black      Blue      Green      Red
  1280.     Magenta    Cyan      Yellow     White
  1281.  
  1282. See also CLS. 
  1283.  
  1284. EXAMPLES 
  1285.  
  1286. Set the default screen colors to bright white text on a blue background: 
  1287.  
  1288.     color bright white on blue
  1289.  
  1290.  
  1291. ΓòÉΓòÉΓòÉ 3.13. COPY - Copy files ΓòÉΓòÉΓòÉ
  1292.  
  1293. SYNTAX     (Internal 4OS2) 
  1294.  
  1295. COPY [d:][path]filename[+]...[/A /B] [[d:][path]filename]
  1296.     [/A /B /C /M /N /P /Q /R /S /U /V]
  1297.  
  1298. PURPOSE 
  1299.  
  1300. Copy or append one or more files. 
  1301.  
  1302. COMMENTS 
  1303.  
  1304. 4OS2 allows you to copy several unrelated files to a target directory with a 
  1305. single COPY command.  If there are two or more arguments on the command line, 
  1306. COPY assumes the last argument is the target.  If there is only one argument, 
  1307. the target is assumed to be the current directory. 
  1308.  
  1309. The plus (+) tells COPY to append two or more files to a single target file. 
  1310. If you don't specify a target, COPY will append each subsequent file to the 
  1311. first file. 
  1312.  
  1313. If you specify more than one source file, and the target is NOT a directory, 
  1314. COPY will automatically append the files to the target. 
  1315.  
  1316. The /A(SCII) or /B(inary) options apply to the preceding filename and to all 
  1317. subsequent filenames on the command line until the filename preceding another 
  1318. /A or /B, if any.  All other options apply to all filenames on the command 
  1319. line. 
  1320.  
  1321. The COPY options are: 
  1322.  
  1323.     /A      If used with a source filename, COPY will copy the file up to, but 
  1324.             not including, the first ^Z character in the file.  If you use /A 
  1325.             with a target filename, COPY will add a ^Z to the end of the file. 
  1326.             COPY defaults to /A when appending files. 
  1327.  
  1328.     /B      If used with a source filename, COPY will copy the entire file. 
  1329.             Using /B with a target filename prevents COPY from appending a ^Z 
  1330.             to the target file.  COPY defaults to /B for normal file copies. 
  1331.  
  1332.     /C      Copy only those files where the target exists and is older than the 
  1333.             source (see /U). 
  1334.  
  1335.     /H      Copy hidden and system files too. 
  1336.  
  1337.     /M      Copy only those files with the archive bit set (see also ATTRIB). 
  1338.             The archive bit will NOT be cleared after copying. 
  1339.  
  1340.     /N      Do everything except actually perform the copy (for testing what 
  1341.             the result of the COPY would be). 
  1342.  
  1343.     /P      Confirm each file copy (Y or N).  An N response will skip that 
  1344.             particular file. 
  1345.  
  1346.     /Q      Don't display filenames as they are copied. 
  1347.  
  1348.     /R      Prompt before overwriting an existing file. 
  1349.  
  1350.     /S      Copy subdirectories - the target must be a directory (COPY will 
  1351.             create it if it doesn't exist).  COPY will copy each subdirectory 
  1352.             to a matching subdirectory of the target. 
  1353.  
  1354.     /U      Copy only those source files that are newer than a matching target 
  1355.             file, or where a matching target file doesn't exist (see /C). 
  1356.  
  1357.     /V      Verify each disk write.  This is the same as executing the VERIFY 
  1358.             ON command, but is only active during the COPY. 
  1359.  
  1360.  See also MOVE. 
  1361.  
  1362.  EXAMPLES 
  1363.  
  1364.  Copy the files MEMO1 and PROJECT8.WKS to the root directory on drive A: 
  1365.  
  1366.       copy memo1 project8.wks a:\
  1367.  
  1368.  Append the files MEMO1, MEMO2, and MEMO3 and store the result in BIGMEMO: 
  1369.  
  1370.       copy memo1+memo2+memo3 bigmemo
  1371.  
  1372.  Copy only those files in the root directory on drive A that are newer than the 
  1373.  matching files in the current directory, or that don't exist in the current 
  1374.  directory: 
  1375.  
  1376.       copy /u a:\*.* c:\*.*
  1377.  
  1378.  Copy files from the root directory on drive A to the current directory, but 
  1379.  prompt before overwriting existing files: 
  1380.  
  1381.       copy /r a:\*.*
  1382.  
  1383.  Copy a downloadable font file to the printer in binary mode: 
  1384.  
  1385.       copy myfont.dat lpt1: /b
  1386.  
  1387.  
  1388. ΓòÉΓòÉΓòÉ 3.14. DATE - Set or display date ΓòÉΓòÉΓòÉ
  1389.  
  1390. SYNTAX     (Internal 4OS2) 
  1391.  
  1392. DATE [mm-dd-yy]
  1393.  
  1394. PURPOSE 
  1395.  
  1396. Display and (optionally) change the system date. 
  1397.  
  1398. COMMENTS 
  1399.  
  1400. If you don't enter any parameters, DATE will display the current system date 
  1401. and time, and prompt for the new date.  Press ENTER if you don't wish to change 
  1402. the date, otherwise enter the new date. 
  1403.  
  1404. The format for the date entry depends on the country code defined in CONFIG.SYS 
  1405. or by the CHCP command.  The default format is U.S. (mm-dd-yy).  The European 
  1406. format is dd-mm-yy; the Japanese is yy-mm-dd. 
  1407.  
  1408. The parameters for the DATE command are: 
  1409.  
  1410.     mm      Month (1 - 12) 
  1411.     dd      Day (1 - 31) 
  1412.     yy      Year (80 - 199 or 1980 - 2099) 
  1413.  
  1414.  You can use hyphens, slashes, or periods to separate the month, day, and year 
  1415.  entries. 
  1416.  
  1417.  See also TIME. 
  1418.  
  1419.  EXAMPLES 
  1420.  
  1421.  Enter the date from the command line: 
  1422.  
  1423.       date 12/25/89
  1424.  
  1425.  To be prompted for the date: 
  1426.  
  1427.       date
  1428.  
  1429.  
  1430. ΓòÉΓòÉΓòÉ 3.15. DEL or ERASE - Delete files ΓòÉΓòÉΓòÉ
  1431.  
  1432. SYNTAX     (Internal 4OS2) 
  1433.  
  1434. DEL [/N /P /Q /S /X /Y /Z] [d:][path]filename...
  1435. ERASE [/N /P /Q /S /X /Y /Z] [d:][path]filename...
  1436.  
  1437. PURPOSE 
  1438.  
  1439. Erase the specified file(s) from the disk. 
  1440.  
  1441. COMMENTS 
  1442.  
  1443. The DEL options are: 
  1444.  
  1445.     /N      Do everything except actually delete the file(s) (for testing what 
  1446.             the result of a DEL would be). 
  1447.  
  1448.     /P      Confirm file deletion for each file. 
  1449.  
  1450.     /Q      Don't display filenames as they are deleted. 
  1451.  
  1452.     /S      Delete matching files in the subdirectories. 
  1453.  
  1454.     /X      Remove empty subdirectories after deleting (use with /S). 
  1455.  
  1456.     /Y      The reverse of /P - it assumes a Y response to everything, 
  1457.             including deleting an entire subdirectory.  Use with caution! 
  1458.  
  1459.     /Z      Delete read-only, hidden and system files as well as normal files. 
  1460.  
  1461.  If you enter a subdirectory name, or a filename composed only of wildcards, 
  1462.  DEL asks for confirmation (Y or N), unless you specified the /Y(es) option. If 
  1463.  you respond with a Y, DEL will delete all the files in that subdirectory 
  1464.  (except for hidden, system, and read-only files). 
  1465.  
  1466.  EXAMPLES 
  1467.  
  1468.  Erase all the files in the current directory with a .BAK or .PRN extension: 
  1469.  
  1470.       del *.bak *.prn
  1471.  
  1472.  Delete the entire subdirectory tree starting with C:\UTIL, including hidden 
  1473.  and read-only files: 
  1474.  
  1475.       del /sxyz c:\util
  1476.  
  1477.  
  1478. ΓòÉΓòÉΓòÉ 3.16. DELAY - Pause for specified time ΓòÉΓòÉΓòÉ
  1479.  
  1480. SYNTAX     (Internal 4OS2) 
  1481.  
  1482. DELAY [seconds]
  1483.  
  1484. PURPOSE 
  1485.  
  1486. Pause for a specified period of time. 
  1487.  
  1488. COMMENTS 
  1489.  
  1490. DELAY is useful in batch file loops while waiting for a condition to occur. The 
  1491. default value is one second. 
  1492.  
  1493. If you need a shorter delay, use BEEP with a frequency < 20 Hz. 
  1494.  
  1495. You can cancel a DELAY loop by pressing ^C. 
  1496.  
  1497. See also BEEP. 
  1498.  
  1499. EXAMPLES 
  1500.  
  1501. Wait for 10 seconds: 
  1502.  
  1503.     delay 10
  1504.  
  1505.  
  1506. ΓòÉΓòÉΓòÉ 3.17. DESCRIBE - Describe files ΓòÉΓòÉΓòÉ
  1507.  
  1508. SYNTAX     (Internal 4OS2) 
  1509.  
  1510. DESCRIBE [d:][path]filename... ["description"]
  1511.  
  1512. PURPOSE 
  1513.  
  1514. Create, modify, or delete file and subdirectory descriptions. 
  1515.  
  1516. COMMENTS 
  1517.  
  1518. DESCRIBE adds descriptions to filenames and subdirectories.  The descriptions 
  1519. will be displayed when using DIR with the default single column option, or when 
  1520. using SELECT.  If you're using 4OS2 on an HPFS volume, descriptions will only 
  1521. be displayed if you use the DIR /Z (FAT format) option.  The default maximum 
  1522. description length is 40 characters; if you have a screen capable of displaying 
  1523. more than 80 columns, you can increase the maximum description length with the 
  1524. 4OS2.INI DescriptionMax option. 
  1525.  
  1526. File descriptions allow you to identify your files in much more meaningful ways 
  1527. than an eight character filename. 
  1528.  
  1529. You can enter a description on the command line by entering the filename 
  1530. followed by the description enclosed in quotes.  Using wildcards and/or 
  1531. multiple filenames with a description on the command line will give all 
  1532. matching files the same description. 
  1533.  
  1534. Descriptions are stored in each directory in a hidden file called DESCRIPT.ION. 
  1535. Use the ATTRIB command to "unhide" this file if you need to copy or delete it. 
  1536.  
  1537. The description file is modified appropriately whenever you perform an internal 
  1538. command (such as COPY, DEL, MOVE, or RENAME), but not if you use an external 
  1539. command (such as REPLACE or XCOPY). 
  1540.  
  1541. See also DIR and SELECT. 
  1542.  
  1543. EXAMPLES 
  1544.  
  1545. Create a description for the file MEMO.TXT interactively: 
  1546.  
  1547.     describe memo.txt
  1548.  
  1549. Create the same description in a single command: 
  1550.  
  1551.     describe memo.txt "Memo to Bob about party"
  1552.  
  1553.  
  1554. ΓòÉΓòÉΓòÉ 3.18. DETACH - Start detached process ΓòÉΓòÉΓòÉ
  1555.  
  1556. SYNTAX     (Internal 4OS2) 
  1557.  
  1558. DETACH [d:][filename[.ext]]
  1559.  
  1560. PURPOSE 
  1561.  
  1562. Start an OS/2 program in detached mode. 
  1563.  
  1564. COMMENTS 
  1565.  
  1566. A program started with DETACH cannot use the keyboard, mouse, or video display. 
  1567. You can redirect standard I/O to other devices if necessary. 
  1568.  
  1569. If you specify an internal command or batch file (.CMD or .BTM), 4OS2 will 
  1570. detach another copy of 4OS2.EXE to execute the command. 
  1571.  
  1572. EXAMPLES 
  1573.  
  1574. Detach a CHKDSK command and redirect its output to the file DIR.DAT: 
  1575.  
  1576.     detach chkdsk >& dir.dat
  1577.  
  1578.  
  1579. ΓòÉΓòÉΓòÉ 3.19. DIR - Display directory ΓòÉΓòÉΓòÉ
  1580.  
  1581. SYNTAX     (Internal 4OS2) 
  1582.  
  1583. DIR [/1 /2 /4 /A[:-rhsda] /B /C /D /F /J /K /L /M /N /O:-deginrsu
  1584.     /P /S /T /U /V /W] [[d:][path]filename...]
  1585.  
  1586. PURPOSE 
  1587.  
  1588. Display information about files and subdirectories. 
  1589.  
  1590. COMMENTS 
  1591.  
  1592. DIR displays information about the files and subdirectories in the specified 
  1593. directory.  Depending upon the options specified, DIR can show the filename, 
  1594. file attributes, size, date and time of the most recent change to the file, and 
  1595. the file description. 
  1596.  
  1597. The DIR options are: 
  1598.  
  1599.     /1      Single column display - display the filename, size, date, time, and 
  1600.             description.  This is the default. 
  1601.  
  1602.     /2      Two column display - display the filename, size, date, and time. 
  1603.  
  1604.     /4      Four column display - display the filename and size, in K(ilobytes) 
  1605.             or M(egabytes). 
  1606.  
  1607.     /A      Display only those files that have the specified attribute set. A 
  1608.             /A with no attributes will display all files, including hidden and 
  1609.             system files.  Preceding the attribute character with a '-' will 
  1610.             display those files that do not have that attribute set. 
  1611.             Attributes can also be combined.  The attributes are: 
  1612.               R  Read only 
  1613.               H  Hidden 
  1614.               S  System 
  1615.               D  Directory 
  1616.               A  Archive 
  1617.  
  1618.     /B      Suppress header line and summaries, and display file or 
  1619.             subdirectory names only, in a single column (useful when 
  1620.             redirecting output to a file or another program). 
  1621.  
  1622.     /C      Display FAT filenames in upper case (like CMD.EXE).  See also 
  1623.             SETDOS /U. 
  1624.  
  1625.     /D      Disable directory colorization. 
  1626.  
  1627.     /F      Display fully expanded filenames (including drive & path) in one 
  1628.             column. 
  1629.  
  1630.     /J      Justify filenames (same format as CMD.EXE). 
  1631.  
  1632.     /K      Suppress the header display. 
  1633.  
  1634.     /L      Display FAT filenames in lower case.  This option will not convert 
  1635.             extended ASCII characters to lower case. 
  1636.  
  1637.     /M      Suppress the footer display. 
  1638.  
  1639.     /N      Display a FAT volume in HPFS format. 
  1640.  
  1641.     /O      Sort order; any combination of the following options: 
  1642.               -  Reverse the sort order for the next option 
  1643.               a  Sort by ASCII value rather than numeric value 
  1644.               d  Sort by date and time (oldest first) 
  1645.               e  Sort by extension 
  1646.               g  Group subdirectories together 
  1647.               i  Sort by the file description 
  1648.               n  Sort by the filename (this is the default) 
  1649.               r  Reverse the sort order for all options 
  1650.               s  Sort by size 
  1651.               u  Unsorted 
  1652.  
  1653.     /P      Pause after each screen page and wait for a key to be pressed 
  1654.             (useful for displaying long directory listings). 
  1655.  
  1656.     /S      Display contents of the current directory and all of its 
  1657.             subdirectories.  DIR will only display headers and summaries for 
  1658.             those directories with matching filenames. 
  1659.  
  1660.     /T      Display the filenames and attributes only (see ATTRIB), in the 
  1661.             format RHSA, where: 
  1662.               R  Read only 
  1663.               H  Hidden 
  1664.               S  System 
  1665.               A  Archive 
  1666.             When displaying attributes, DIR cannot display file descriptions. 
  1667.  
  1668.     /U      Display summary only (number of files & bytes used; both actual 
  1669.             file size and the disk space used). 
  1670.  
  1671.     /V      Display filenames sorted vertically rather than horizontally (with 
  1672.             the /2, /4, or /W option). 
  1673.  
  1674.     /W      Wide display - display the filenames only, horizontally across the 
  1675.             screen (5 columns on an 80-character display). 
  1676.  
  1677.     /Z      Display an HPFS volume in FAT format.  Filenames longer than 12 
  1678.             characters will be truncated. 
  1679.  
  1680.  DIR allows wildcard characters in the filename.  If you don't specify a 
  1681.  filename, DIR defaults to *.* (display all files and subdirectories in the 
  1682.  current directory). 
  1683.  
  1684.  If you append filenames with a ; (an "include list"), DIR will display the 
  1685.  matching filenames in a single directory listing.  Only the first file in an 
  1686.  include list can have a path. 
  1687.  
  1688.  You can display the subdirectories and files in color by setting the COLORDIR 
  1689.  variable.  The format for COLORDIR is: 
  1690.  
  1691.       ext [...]:[bright][blink] fg [ON bg]; ...
  1692.  
  1693.  where "ext" is the file extension, or one of the following file attributes: 
  1694.  
  1695.       DIRS - directory
  1696.       RDONLY - read-only file
  1697.       HIDDEN - hidden file
  1698.       SYSTEM - system file
  1699.       ARCHIVE - file modified since last backup
  1700.  
  1701.  For example, to display the .COM and .EXE files in red, the .C and .ASM files 
  1702.  in bright cyan, and the read-only files in blinking green: 
  1703.  
  1704.       set colordir=com exe:red; c asm:bright cyan; rdonly:blink green
  1705.  
  1706.  If you don't select a background color, DIR will use the current screen 
  1707.  background color. 
  1708.  
  1709.  If a country code was defined in the CONFIG.SYS file or by the CHCP command, 
  1710.  DIR will display the date in the format for that country.  The default date 
  1711.  format is U.S. (mm-dd-yy). 
  1712.  
  1713.  Options on the command line apply only to the filenames that follow the 
  1714.  option, except that options at the end of the line apply to the preceding 
  1715.  filename only.  This allows you to specify several options for a group of 
  1716.  files, and retains compatibility with CMD.EXE when a single filename is 
  1717.  specified. 
  1718.  
  1719.  See also DESCRIBE and SELECT. 
  1720.  
  1721.  EXAMPLES 
  1722.  
  1723.  Display the .WKS files, and then the .WK1 files in the current directory: 
  1724.  
  1725.       dir *.wks *.wk1
  1726.  
  1727.  Display the .WKS and .WK1 files together (an "include list"): 
  1728.  
  1729.       dir *.wks;*.wk1
  1730.  
  1731.  Display the files on drive C, including hidden and system files, pausing after 
  1732.  each page: 
  1733.  
  1734.       dir /a/sp c:\*.*
  1735.  
  1736.  
  1737. ΓòÉΓòÉΓòÉ 3.20. DIRS - Display directory stack ΓòÉΓòÉΓòÉ
  1738.  
  1739. SYNTAX     (Internal 4OS2) 
  1740.  
  1741. DIRS
  1742.  
  1743. PURPOSE 
  1744.  
  1745. Display the current directory stack. 
  1746.  
  1747. COMMENTS 
  1748.  
  1749. DIRS displays the directory stack used by PUSHD and POPD, oldest entries first. 
  1750. The stack holds 255 characters (about 10 to 20 entries). 
  1751.  
  1752. See also PUSHD and POPD. 
  1753.  
  1754. EXAMPLES 
  1755.  
  1756. Change directories and then display the directory stack: 
  1757.  
  1758.     pushd c:\database
  1759.     pushd d:\wordp\memos
  1760.     dirs
  1761.  
  1762.  
  1763. ΓòÉΓòÉΓòÉ 3.21. DPATH - Display/Set data search path ΓòÉΓòÉΓòÉ
  1764.  
  1765. SYNTAX     (Internal 4OS2) 
  1766.  
  1767. DPATH [[d:]path][[;[d:]path]...]]
  1768. DPATH ;
  1769.  
  1770. PURPOSE 
  1771.  
  1772. Tells applications where to search for their files. 
  1773.  
  1774. COMMENTS 
  1775.  
  1776. If you enter DPATH with no parameters, 4OS2 displays the current search path. 
  1777. If you enter DPATH and a semicolon, 4OS2 clears the search path. 
  1778.  
  1779. You can edit an existing DPATH with the ESET command. 
  1780.  
  1781. EXAMPLES 
  1782.  
  1783. The following DPATH command directs applications to search for their data files 
  1784. in the following order: the current directory, the root directory on drive C, 
  1785. the OS2 subdirectory on drive C, and the UTIL subdirectory on drive C: 
  1786.  
  1787.     dpath c:\;c:\os2;c:\util
  1788.  
  1789. Display the current DPATH: 
  1790.  
  1791.     dpath
  1792.  
  1793.  
  1794. ΓòÉΓòÉΓòÉ 3.22. DRAWBOX - Draw a box ΓòÉΓòÉΓòÉ
  1795.  
  1796. SYNTAX     (Internal 4OS2) 
  1797.  
  1798. DRAWBOX ulrow ulcol lrrow lrcol style [bright][blink] fg ON bg
  1799.     [FILL bgfill] [SHADOW]
  1800.  
  1801. PURPOSE 
  1802.  
  1803. Draw a box on the screen. 
  1804.  
  1805. COMMENTS 
  1806.  
  1807. DRAWBOX is useful for creating attractive screen displays in batch files. 
  1808. DRAWBOX detects other lines and boxes on the display, and creates the 
  1809. appropriate connector characters when possible (not all types of lines can be 
  1810. connected with the available characters). 
  1811.  
  1812. The row and column numbering is zero-based, so on a standard 25 line by 80 
  1813. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  1814.  
  1815. The DRAWBOX parameters are: 
  1816.  
  1817.     ulrow         Row for upper left corner 
  1818.  
  1819.     ulcol         Column for upper left corner 
  1820.  
  1821.     lrrow         Row for lower right corner 
  1822.  
  1823.     lrcol         Column for lower right corner 
  1824.  
  1825.     style         Box drawing style: 
  1826.                     0  no line drawing characters (box is drawn with blanks) 
  1827.                     1  single line 
  1828.                     2  double line 
  1829.                     3  single line on top and bottom, double on sides 
  1830.                     4  double line on top and bottom, single on sides 
  1831.  
  1832.     fg            Foreground character color 
  1833.  
  1834.     bg            Background character color 
  1835.  
  1836.     bgfill        Background fill color (for the inside of the box) 
  1837.  
  1838.     SHADOW        Include a transparent drop shadow. 
  1839.  
  1840.  Only the first three characters of the color name and attributes ("bright" and 
  1841.  "blink") are required. 
  1842.  
  1843.  The available colors are: 
  1844.  
  1845.       Black      Blue      Green      Red
  1846.       Magenta    Cyan      Yellow     White
  1847.  
  1848.  See also DRAWHLINE and DRAWVLINE. 
  1849.  
  1850.  EXAMPLES 
  1851.  
  1852.  Draw a single line box around the entire screen with bright white lines on a 
  1853.  blue background: 
  1854.  
  1855.       drawbox 0 0 24 79 1 bright white on blue fill blue
  1856.  
  1857.  
  1858. ΓòÉΓòÉΓòÉ 3.23. DRAWHLINE - Draw horizontal line ΓòÉΓòÉΓòÉ
  1859.  
  1860. SYNTAX     (Internal 4OS2) 
  1861.  
  1862. DRAWHLINE row columns length style [bright] [blink] fg ON bg
  1863.  
  1864. PURPOSE 
  1865.  
  1866. Draw a horizontal line on the screen. 
  1867.  
  1868. COMMENTS 
  1869.  
  1870. DRAWHLINE is useful for creating attractive screen displays in batch files. 
  1871. DRAWHLINE detects other lines and boxes on the display, and creates the 
  1872. appropriate connector characters when possible (not all types of lines can be 
  1873. connected with the available characters). 
  1874.  
  1875. The row and column numbering is zero-based, so on a standard 25 line by 80 
  1876. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  1877.  
  1878. The DRAWHLINE parameters are: 
  1879.  
  1880.     row         Start row 
  1881.  
  1882.     column      Start column 
  1883.  
  1884.     length      Length of line 
  1885.  
  1886.     style       Line drawing style: 
  1887.                   1  Single line 
  1888.                   2  Double line 
  1889.  
  1890.     fg          Foreground character color 
  1891.  
  1892.     bg          Background character color 
  1893.  
  1894.  Only the first three characters of the color name and attributes ("bright" and 
  1895.  "blink") are required. 
  1896.  
  1897.  The available colors are: 
  1898.  
  1899.       Black      Blue      Green      Red
  1900.       Magenta    Cyan      Yellow     White
  1901.  
  1902.  See also DRAWBOX, DRAWVLINE and SCRPUT. 
  1903.  
  1904.  EXAMPLES 
  1905.  
  1906.  Draw a double line along the top row of the display with green characters on a 
  1907.  blue background: 
  1908.  
  1909.       drawhline 0 0 79 2 green on blue
  1910.  
  1911.  
  1912. ΓòÉΓòÉΓòÉ 3.24. DRAWVLINE - Draw vertical line ΓòÉΓòÉΓòÉ
  1913.  
  1914. SYNTAX     (Internal 4OS2) 
  1915.  
  1916. DRAWVLINE row columns length style [bright] [blink] fg ON bg
  1917.  
  1918. PURPOSE 
  1919.  
  1920. Draw a vertical line on the screen. 
  1921.  
  1922. COMMENTS 
  1923.  
  1924. DRAWVLINE is useful for creating attractive screen displays in batch files. 
  1925. DRAWVLINE detects other lines and boxes on the display, and creates the 
  1926. appropriate connector characters when possible (not all types of lines can be 
  1927. connected with the available characters). 
  1928.  
  1929. The row and column numbering is zero-based, so on a standard 25 line by 80 
  1930. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  1931.  
  1932. The DRAWVLINE parameters are: 
  1933.  
  1934.     row         Start row 
  1935.  
  1936.     column      Start column 
  1937.  
  1938.     length      Length of line 
  1939.  
  1940.     style       Line drawing style: 
  1941.                   1  Single line 
  1942.                   2  Double line 
  1943.  
  1944.     fg          Foreground character color 
  1945.  
  1946.     bg          Background character color 
  1947.  
  1948.  Only the first three characters of the color name and attributes ("bright" and 
  1949.  "blink") are required. 
  1950.  
  1951.  The available colors are: 
  1952.  
  1953.       Black      Blue      Green      Red
  1954.       Magenta    Cyan      Yellow     White
  1955.  
  1956.  See also DRAWBOX, DRAWHLINE, and VSCRPUT. 
  1957.  
  1958.  EXAMPLES 
  1959.  
  1960.  Draw a double line along the left margin of the display with bright red 
  1961.  characters on a black background: 
  1962.  
  1963.       drawvline 0 0 24 2 bright red on black
  1964.  
  1965.  
  1966. ΓòÉΓòÉΓòÉ 3.25. ECHO - Display a message ΓòÉΓòÉΓòÉ
  1967.  
  1968. SYNTAX     (Internal 4OS2) 
  1969.  
  1970. ECHO [on | off | message]
  1971.  
  1972. PURPOSE 
  1973.  
  1974. Display the echo status, enable or disable batch file or command line echoing, 
  1975. or display a message. 
  1976.  
  1977. COMMENTS 
  1978.  
  1979. ECHO defaults to ON in batch files.  To prevent a line from being echoed, 
  1980. preface it with the @ symbol.  You can default to ECHO OFF by setting the 
  1981. SETDOS /V option to 0.  (Setting SETDOS /V to 2 will echo all lines, regardless 
  1982. of the echo state or @ symbols.)  The current ECHO state is inherited by called 
  1983. batch files. 
  1984.  
  1985. ECHO defaults to OFF during keyboard input.  If you set ECHO ON from the 
  1986. command line, the fully parsed and expanded commands (including aliases and 
  1987. variables) will be displayed before they are executed.  The keyboard ECHO state 
  1988. is independent of the batch file ECHO state; changing ECHO in a batch file has 
  1989. no effect on the display at the command prompt, and vice versa. 
  1990.  
  1991. If no arguments are entered, ECHO displays the current echo state. 
  1992.  
  1993. ECHO commands in a batch file will send messages to the screen while the batch 
  1994. file executes, even if ECHO is set OFF.  You cannot use the command separator 
  1995. character or the redirection symbols (|><) in an ECHO message, unless you 
  1996. enclose them in quotes or precede them with the escape character.  If you want 
  1997. to echo a blank line, enter: 
  1998.  
  1999.     echo.
  2000.  
  2001. See also ECHOS, SETDOS, SCREEN, SCRPUT, TEXT and VSCRPUT. 
  2002.  
  2003. EXAMPLES 
  2004.  
  2005. Enable command line echoing: 
  2006.  
  2007.     echo on
  2008.  
  2009. Display a message in a batch file: 
  2010.  
  2011.     echo Processing your print files...
  2012.  
  2013. Turn off batch file echoing, without displaying the ECHO command itself: 
  2014.  
  2015.     @echo off
  2016.  
  2017.  
  2018. ΓòÉΓòÉΓòÉ 3.26. ECHOS - Display a message with no CR/LF ΓòÉΓòÉΓòÉ
  2019.  
  2020. SYNTAX     (Internal 4OS2) 
  2021.  
  2022. ECHOS message
  2023.  
  2024. PURPOSE 
  2025.  
  2026. Display a message, without printing a trailing CR/LF. 
  2027.  
  2028. COMMENTS 
  2029.  
  2030. ECHOS is useful for outputting text when you don't want ECHO to add a carriage 
  2031. return / linefeed pair (for example, when redirecting control sequences to a 
  2032. printer).  You cannot use the command separator character or the redirection 
  2033. symbols (|><) in an ECHOS message, unless you enclose them in quotes or precede 
  2034. them with the escape character. 
  2035.  
  2036. See also ECHO. 
  2037.  
  2038. EXAMPLES 
  2039.  
  2040. Send a control sequence (an Esc+H) to the printer. 
  2041.  
  2042.     echos ^eH > lpt1:
  2043.  
  2044.  
  2045. ΓòÉΓòÉΓòÉ 3.27. ENDLOCAL - Restore saved environment ΓòÉΓòÉΓòÉ
  2046.  
  2047. SYNTAX     (Internal 4OS2) 
  2048.  
  2049. ENDLOCAL
  2050.  
  2051. PURPOSE 
  2052.  
  2053. Restore the saved disk drive, directory, and environment. 
  2054.  
  2055. COMMENTS 
  2056.  
  2057. ENDLOCAL restores the disk drive, directory, and environment variables saved by 
  2058. the previous SETLOCAL command.  SETLOCAL and ENDLOCAL can only be used in batch 
  2059. files, not in aliases. 
  2060.  
  2061. See also SETLOCAL. 
  2062.  
  2063. EXAMPLES 
  2064.  
  2065. This batch file fragment saves the aliases, environment, drive, and current 
  2066. working directory, changes the drive and directory, modifies some environment 
  2067. variables, runs the program TEST1, and then restores the original values: 
  2068.  
  2069.     setlocal
  2070.     cdd d:\test
  2071.     set path=c:\;c:\dos;c:\util
  2072.     set lib=d:\lib
  2073.     test1
  2074.     endlocal
  2075.  
  2076.  
  2077. ΓòÉΓòÉΓòÉ 3.28. ESET - Edit variable or alias ΓòÉΓòÉΓòÉ
  2078.  
  2079. SYNTAX     (Internal 4OS2) 
  2080.  
  2081. ESET [/A] varname...
  2082.  
  2083. PURPOSE 
  2084.  
  2085. Edit environment variables and/or aliases. 
  2086.  
  2087. COMMENTS 
  2088.  
  2089. ESET allows you to edit your environment variables and aliases using the line 
  2090. editing commands.  The cursor will be positioned at the first character of the 
  2091. variable or alias. 
  2092.  
  2093. The ESET options are: 
  2094.  
  2095.     /A      Assume the argument is an alias.  This allows you to edit an alias 
  2096.             with the same name as an environment variable. 
  2097.  
  2098.  ESET will search for environment variables first, and then aliases. 
  2099.  
  2100.  Environment variable and alias names are limited to 80 characters, and their 
  2101.  arguments to 255 characters. 
  2102.  
  2103.  See also Command line editing, ALIAS, UNALIAS, SET, and UNSET. 
  2104.  
  2105.  EXAMPLES 
  2106.  
  2107.  Edit the executable file search path: 
  2108.  
  2109.       eset path
  2110.  
  2111.  Create and then edit an alias: 
  2112.  
  2113.       alias d dir /djp
  2114.       eset d
  2115.  
  2116.  
  2117. ΓòÉΓòÉΓòÉ 3.29. EXCEPT - Exclude files from command ΓòÉΓòÉΓòÉ
  2118.  
  2119. SYNTAX     (Internal 4OS2) 
  2120.  
  2121. EXCEPT ([d:][path]filename...) command
  2122.  
  2123. PURPOSE 
  2124.  
  2125. Perform a command, except on the file(s) specified. 
  2126.  
  2127. COMMENTS 
  2128.  
  2129. EXCEPT provides a means of executing a command on a group of files and/or 
  2130. subdirectories, except those enclosed within the parentheses. 
  2131.  
  2132. The command can be an internal command or alias, an external command, or a 
  2133. batch file. 
  2134.  
  2135. You may use wildcard characters in a filename. 
  2136.  
  2137. When using filename completion (TAB or F9) to get the filenames inside the 
  2138. parentheses, type a space after the open parenthesis before entering a partial 
  2139. filename or pressing TAB. Otherwise the command line editor will treat the open 
  2140. parenthesis as the first character of the filename to be completed. 
  2141.  
  2142. EXCEPT prevents operations on the specified file(s) by setting the hidden 
  2143. attribute, performing the command, and then clearing the hidden attribute. If 
  2144. EXCEPT is aborted in an unusual way, you may need to use the ATTRIB command to 
  2145. "unhide" (-H) the file(s). 
  2146.  
  2147. EXCEPT will not work with programs or commands that ignore the hidden 
  2148. attribute. 
  2149.  
  2150. See also ATTRIB. 
  2151.  
  2152. EXAMPLES 
  2153.  
  2154. Erase all but the files beginning with MEMO and those ending in .WKS: 
  2155.  
  2156.     except (memo*.* *.wks) del *.*
  2157.  
  2158.  
  2159. ΓòÉΓòÉΓòÉ 3.30. EXIT - Exit secondary processor ΓòÉΓòÉΓòÉ
  2160.  
  2161. SYNTAX     (Internal 4OS2) 
  2162.  
  2163. EXIT [value]
  2164.  
  2165. PURPOSE 
  2166.  
  2167. Exit the current command processor. 
  2168.  
  2169. COMMENTS 
  2170.  
  2171. Some application programs will start a secondary copy of the command processor 
  2172. to allow you execute commands.  To return to the application again, type EXIT. 
  2173.  
  2174. If you EXIT from a primary command processor, you will be returned to PM. 
  2175.  
  2176. If you specify a value, EXIT will return that value to the parent process. 
  2177.  
  2178. EXAMPLES 
  2179.  
  2180. Return to the parent process: 
  2181.  
  2182.     exit
  2183.  
  2184.  
  2185. ΓòÉΓòÉΓòÉ 3.31. FOR - Repeat a command ΓòÉΓòÉΓòÉ
  2186.  
  2187. SYNTAX     (Internal 4OS2) 
  2188.  
  2189. FOR [/A[:-RHSDA]] %%var IN (set) [DO] command
  2190.  
  2191. PURPOSE 
  2192.  
  2193. Repeat a command for several variables. 
  2194.  
  2195. COMMENTS 
  2196.  
  2197. FOR sets var sequentially to each member of (set), and then evaluates and 
  2198. executes command for every argument in (set). If an argument in (set) contains 
  2199. wildcard characters, var will be set sequentially to each matching filename on 
  2200. the disk.  If a filename in (set) begins with an @, var will be set 
  2201. sequentially to each line in the file. 
  2202.  
  2203. The only option for FOR is: 
  2204.  
  2205.     /A      Retrieve only those files with the specified attribute.  A /A with 
  2206.             no attributes will retrieve all files, including hidden and system 
  2207.             files, and subdirectories.  Preceding the attribute character with 
  2208.             a '-' will retrieve those files that DON'T have that attribute set. 
  2209.             Attributes can also be combined.  The attributes are: 
  2210.               R  Read only 
  2211.               H  Hidden 
  2212.               S  System 
  2213.               D  Directory 
  2214.               A  Archive 
  2215.  
  2216.  The command can be an internal command or alias, an external command, or a 
  2217.  batch file. 
  2218.  
  2219.  In CMD.EXE you must use a single % for the variable name from the command 
  2220.  line, and %% when in a batch file.  4OS2 will accept either % or %% in either 
  2221.  case. 
  2222.  
  2223.  CMD.EXE requires the variable name to be a single character; 4OS2 supports 
  2224.  variable names up to 80 characters. 
  2225.  
  2226.  CMD.EXE requires the word DO on the command line; it is optional in 4OS2. 
  2227.  
  2228.  Note that 4OS2 supports nested FOR statements; CMD.EXE does not. 
  2229.  
  2230.  EXAMPLES 
  2231.  
  2232.  The following example compiles the C programs in the current directory that 
  2233.  have a "2" or a "3" somewhere in their name: 
  2234.  
  2235.       for %a in (*2*.c *3*.c) do cl %a ;
  2236.  
  2237.  The following example uses variable functions to delete the .BAK files for 
  2238.  which a corresponding .TXT file exists in the current directory: 
  2239.  
  2240.       for %a in (*.txt) if exist %@name[%a].bak del %@name[%a].bak
  2241.  
  2242.  
  2243. ΓòÉΓòÉΓòÉ 3.32. FREE - Display disk utilization ΓòÉΓòÉΓòÉ
  2244.  
  2245. SYNTAX     (Internal 4OS2) 
  2246.  
  2247. FREE [d:] ...
  2248.  
  2249. PURPOSE 
  2250.  
  2251. Display the total disk space, total bytes used, and total bytes free on the 
  2252. specified (or default) drive(s). 
  2253.  
  2254. COMMENTS 
  2255.  
  2256. FREE provides the same disk information as the external command CHKDSK, but 
  2257. without the wait. 
  2258.  
  2259. EXAMPLES 
  2260.  
  2261. Display the status of drives A, B, and C: 
  2262.  
  2263.     free a: b: c:
  2264.  
  2265.  
  2266. ΓòÉΓòÉΓòÉ 3.33. GLOBAL - Execute command in all subdirectories ΓòÉΓòÉΓòÉ
  2267.  
  2268. SYNTAX     (Internal 4OS2) 
  2269.  
  2270. GLOBAL [/H /I /P /Q] command
  2271.  
  2272. PURPOSE 
  2273.  
  2274. Execute a command in the current directory and its subdirectories. 
  2275.  
  2276. COMMENTS 
  2277.  
  2278. GLOBAL performs the specified command first in the current directory, and then 
  2279. in every subdirectory under the current directory. 
  2280.  
  2281. The command can be an internal command or alias, an external command, or a 
  2282. batch file. 
  2283.  
  2284. The GLOBAL options are: 
  2285.  
  2286.     /H      Process hidden subdirectories. 
  2287.  
  2288.     /I      Ignore exit codes.  If this option is not specified, GLOBAL will 
  2289.             terminate if the command returns a non-zero exit code. 
  2290.  
  2291.     /P      Prompt for a Y/N whether to execute the command in each directory. 
  2292.  
  2293.     /Q      Do not display the directory names as each directory is accessed. 
  2294.  
  2295.  EXAMPLES 
  2296.  
  2297.  Copy the files in every directory on drive A to the directory C:\TEMP: 
  2298.  
  2299.       cd a:\ & global copy a:*.* c:\temp
  2300.  
  2301.  
  2302. ΓòÉΓòÉΓòÉ 3.34. GOSUB - Call batch subroutine ΓòÉΓòÉΓòÉ
  2303.  
  2304. SYNTAX     (Internal 4OS2) 
  2305.  
  2306. GOSUB label
  2307.  
  2308. PURPOSE 
  2309.  
  2310. Call a subroutine in a batch file. 
  2311.  
  2312. COMMENTS 
  2313.  
  2314. GOSUB calls the specified label as a subroutine.  The subroutine must end with 
  2315. a RETURN statement.  After the RETURN, the batch file continues with the 
  2316. command following the GOSUB command. 
  2317.  
  2318. GOSUB searches for the label starting at the first line of the batch file. If 
  2319. the label doesn't exist, the batch file is terminated with the error message 
  2320. "Label not found." 
  2321.  
  2322. The label must begin with a colon (:), and appear by itself on the line. GOSUB 
  2323. ignores case differences when matching labels. 
  2324.  
  2325. See also GOTO and RETURN. 
  2326.  
  2327. EXAMPLES 
  2328.  
  2329. The following batch file fragment calls a subroutine that displays the 
  2330. directory and returns: 
  2331.  
  2332.     echo Calling a subroutine
  2333.     gosub subr1
  2334.     echo Returned from the subroutine
  2335.     quit
  2336.     :subr1
  2337.     dir /hw
  2338.     return
  2339.  
  2340.  
  2341. ΓòÉΓòÉΓòÉ 3.35. GOTO - Jump to batch label ΓòÉΓòÉΓòÉ
  2342.  
  2343. SYNTAX     (Internal 4OS2) 
  2344.  
  2345. GOTO [/I] label
  2346.  
  2347. PURPOSE 
  2348.  
  2349. Continue batch file processing at the line following the label. 
  2350.  
  2351. COMMENTS 
  2352.  
  2353. GOTO changes the current position in the batch file to the line immediately 
  2354. following the label. 
  2355.  
  2356. The search for the label starts at the first line of the batch file. If the 
  2357. label doesn't exist, the batch file is terminated with the error message "Label 
  2358. not found." 
  2359.  
  2360. The label must begin with a colon (:), and appear by itself on the line. GOTO 
  2361. ignores case differences when matching labels. 
  2362.  
  2363. A GOTO will cancel all IFF nesting, unless you specify the /I option. 
  2364.  
  2365. See also GOSUB. 
  2366.  
  2367. EXAMPLES 
  2368.  
  2369. The following batch file fragment checks for the existence of the file 
  2370. CONFIG.SYS.  If CONFIG.SYS exists, GOTO jumps to C_EXISTS and copies all the 
  2371. files from the current directory to the root directory on A.  If CONFIG.SYS 
  2372. doesn't exist, the batch file prints an error message and exits. 
  2373.  
  2374.     if exist config.sys goto C_EXISTS
  2375.     echo CONFIG.SYS doesn't exist - exiting
  2376.     quit
  2377.     :c_exists
  2378.     copy *.* a:\
  2379.  
  2380.  
  2381. ΓòÉΓòÉΓòÉ 3.36. HELP - Display 4OS2 online help ΓòÉΓòÉΓòÉ
  2382.  
  2383. SYNTAX     (Internal 4OS2) 
  2384.  
  2385. HELP [command]
  2386.  
  2387. PURPOSE 
  2388.  
  2389. Display the 4OS2 help file. 
  2390.  
  2391. COMMENTS 
  2392.  
  2393. HELP uses the PM VIEW.EXE program to display help for 4OS2 (4OS2.INF) and OS/2 
  2394. in general (CMDREF.INF).  You can change the default .INF files with the 
  2395. HelpBook directive in 4OS2.INI. 
  2396.  
  2397. EXAMPLES 
  2398.  
  2399. Display the HELP table of contents: 
  2400.  
  2401.     help
  2402.  
  2403. Display help for the DIR command: 
  2404.  
  2405.     help dir
  2406.  
  2407.  
  2408. ΓòÉΓòÉΓòÉ 3.37. HISTORY - Display/Set command history ΓòÉΓòÉΓòÉ
  2409.  
  2410. SYNTAX     (Internal 4OS2) 
  2411.  
  2412. HISTORY [/A command] [/F /P] [/R [d:][path]filename]
  2413.  
  2414. PURPOSE 
  2415.  
  2416. Display, read, or clear the history list. 
  2417.  
  2418. COMMENTS 
  2419.  
  2420. If no parameters are entered, HISTORY displays the current history list. 
  2421.  
  2422. The HISTORY options are: 
  2423.  
  2424.     /A      Add the specified command to the history list. 
  2425.  
  2426.     /F      Clear the command history list. 
  2427.  
  2428.     /P      Prompt for a key after displaying each page. 
  2429.  
  2430.     /R      Read the command history from the specified file. You can save the 
  2431.             history list by redirecting the output of HISTORY to a file. 
  2432.  
  2433.  The number of commands saved in the history list depends on the length of each 
  2434.  command line.  The history list size can be specified at startup from 256 to 
  2435.  8192 characters.  The default size is 1024 characters. 
  2436.  
  2437.  You can disable saving commands to the history list, or specify a minimum 
  2438.  command line length to save, with the HistMin directive in 4OS2.INI. 
  2439.  
  2440.  EXAMPLES 
  2441.  
  2442.  Display the history list: 
  2443.  
  2444.       history
  2445.  
  2446.  Clear the history entries: 
  2447.  
  2448.       history /f
  2449.  
  2450.  Save the history list to the file HISTFILE, and then read it in again: 
  2451.  
  2452.       history > histfile
  2453.       history /r histfile
  2454.  
  2455.  
  2456. ΓòÉΓòÉΓòÉ 3.38. IF - Conditional command execution ΓòÉΓòÉΓòÉ
  2457.  
  2458. SYNTAX     (Internal 4OS2) 
  2459.  
  2460. IF [NOT] condition [.AND. | .OR. | .XOR. [NOT] ...] command
  2461.  
  2462. PURPOSE 
  2463.  
  2464. Allow conditional execution of commands. 
  2465.  
  2466. COMMENTS 
  2467.  
  2468. IF first tests the given condition.  If the condition is true, IF executes the 
  2469. specified command, otherwise the command will be ignored.  If you use the NOT 
  2470. option, the command is executed only when the condition is false.  IF 
  2471. statements can be nested. 
  2472.  
  2473. The command can be an internal command or alias, an external command, or a 
  2474. batch file. 
  2475.  
  2476. For the string tests, case differences are ignored.  When comparing strings, 
  2477. you should enclose them in double quotes (see examples).  The use of double 
  2478. quotes reduces problems when the strings being compared contain characters that 
  2479. may have another meaning to the parser.  If the strings begin with a digit, IF 
  2480. will do a numeric comparison. Otherwise, IF does an ASCII comparison. 
  2481.  
  2482. The .AND., .OR., and .XOR. tests allow you to combine tests in an IF statement. 
  2483. The expressions are scanned from left to right. 
  2484.  
  2485. The condition can be any of the following: 
  2486.  
  2487.     string1 == string2   or   string1 EQ string2
  2488.         If string1 is equal to string2, the condition is true. 
  2489.  
  2490.     string1 != string2   or   string1 NE string2
  2491.         If string1 is not equal to string2, the condition is true. 
  2492.  
  2493.     string1 LT string2
  2494.         If string1 is < string2, the condition is true. 
  2495.  
  2496.     string1 LE string2
  2497.         If string1 is <= string2, the condition is true. 
  2498.  
  2499.     string1 GE string2
  2500.         If string1 is >= string2, the condition is true. 
  2501.  
  2502.     string1 GT string2
  2503.         If string1 is > string2, the condition is true. 
  2504.  
  2505.  In the tests below, the term "condition" refers to one of the relational 
  2506.  operators described for the string tests above (==, EQ, NE, LT, etc.). 
  2507.  
  2508.     ERRORLEVEL [condition] number
  2509.         Test the exit code of the preceding external program.  If no relational 
  2510.         operator (EQ, GT, etc.) is specified, the default is GE. NOTE:  Not all 
  2511.         programs return an explicit exit code.  In those cases, the behavior of 
  2512.         ERRORLEVEL is undefined. 
  2513.  
  2514.     EXIST [d:][path]filename
  2515.         If the file exists, the condition is true.  You can use wildcard 
  2516.         characters in the filename, in which case the condition is true if any 
  2517.         file matching the wildcards exists. 
  2518.  
  2519.     ISALIAS aliasname
  2520.         If the specified name is an alias, the condition is true. 
  2521.  
  2522.     ISDIR [d:]path
  2523.         If the subdirectory exists, the condition is true. 
  2524.  
  2525.     ISINTERNAL command
  2526.         If the specified command is an internal command, the condition is true. 
  2527.  
  2528.     ISLABEL labelname
  2529.         If the specified label exists in the current batch file, the condition 
  2530.         is true. 
  2531.  
  2532.  See also IFF. 
  2533.  
  2534.  EXAMPLES 
  2535.  
  2536.  Test for the presence of A:\JAN.DOC and copy it to the root directory on drive 
  2537.  C if it exists: 
  2538.  
  2539.       if exist a:\jan.doc copy a:\jan.doc c:\
  2540.  
  2541.  This batch file fragment tests for a string value: 
  2542.  
  2543.       if "%cmd" == "wp" goto wordproc
  2544.       if "%cmd" NE "graphics" goto badentry
  2545.  
  2546.  Test for more than 500K of free disk space on drive A: 
  2547.  
  2548.       if %@diskfree[a:] gt 500 echo More than 500K free
  2549.  
  2550.  Run the program MONOPROG if the monitor type is monochrome: 
  2551.  
  2552.       if %_monitor == mono monoprog
  2553.  
  2554.  
  2555. ΓòÉΓòÉΓòÉ 3.39. IFF - Conditional command execution ΓòÉΓòÉΓòÉ
  2556.  
  2557. SYNTAX     (Internal 4OS2) 
  2558.  
  2559. IFF [NOT] condition [.AND. | .OR. | .XOR. [NOT] ...]
  2560.     THEN & ... & ELSE[[IFF] ... THEN] & ... & ENDIFF
  2561.  
  2562. PURPOSE 
  2563.  
  2564. Allow IF/THEN/ELSE conditional execution of commands. 
  2565.  
  2566. COMMENTS 
  2567.  
  2568. IFF first tests the given condition.  If the condition is true, IFF executes 
  2569. the specified command(s) until the next ELSE, ELSEIFF, or ENDIFF; otherwise the 
  2570. command(s) will be ignored and parsing will continue at the next ELSE, ELSEIFF, 
  2571. or ENDIFF.  If you use the NOT option, commands are executed only when the 
  2572. condition is false.  IFF statements can be nested up to 15 levels deep. 
  2573.  
  2574. The .AND., .OR., and .XOR. tests allow you to combine tests in an IFF 
  2575. statement.  The expressions are scanned from left to right; each new .AND., 
  2576. .OR., or .XOR. tests the combination of all preceding tests. 
  2577.  
  2578. The command can be an internal command or alias, an external command, or a 
  2579. batch file. 
  2580.  
  2581. If you do a GOTO inside an IFF, GOTO assumes you are jumping outside the IFF 
  2582. statement.  You cannot GOTO another part of the same IFF, or inside another IFF 
  2583. statement. 
  2584.  
  2585. See the IF command for a list of the tests available. 
  2586.  
  2587. EXAMPLES 
  2588.  
  2589. The following batch file fragment tests the monitor type (monochrome or color), 
  2590. and sets the appropriate colors and prompt: 
  2591.  
  2592.     iff %_monitor == color then
  2593.       color bright white on blue & cls
  2594.       prompt=$e[s$e[1;1f$e[41;1;37m$e[K  Path: $p$e[u$e[44;37m$n$g
  2595.     else
  2596.       prompt=$e[s$e[1;1f$e[0;7m$e[K  Path: $p$e[u$e[0m$n$g
  2597.     endiff
  2598.  
  2599. The following alias checks to see if the argument is a subdirectory.  If so, 
  2600. the alias deletes the subdirectory's files and removes it (enter this on one 
  2601. line): 
  2602.  
  2603.     alias zap `iff isdir %1 then & del /s/x/z %1 & else &
  2604.        echo Not a directory! & endiff`
  2605.  
  2606.  
  2607. ΓòÉΓòÉΓòÉ 3.40. INKEY - Enter environment variable ΓòÉΓòÉΓòÉ
  2608.  
  2609. SYNTAX     (Internal 4OS2) 
  2610.  
  2611. INKEY [/K"..." /Wn] [text] %%varname
  2612.  
  2613. PURPOSE 
  2614.  
  2615. Get a single keystroke environment variable from standard input. 
  2616.  
  2617. COMMENTS 
  2618.  
  2619. You can optionally display prompt text before the variable name. 
  2620.  
  2621. The INKEY options are: 
  2622.  
  2623.     /K      The allowable keystrokes, enclosed in double quotes.  If you want 
  2624.             to read a control or function key, you must enclose it in square 
  2625.             brackets (for example, INKEY /K"ab[F1][F10]"). The valid key names 
  2626.             are the same as those listed in the section on Key Mapping 
  2627.             Directives in KEYCODES. 
  2628.  
  2629.     /W      Timeout period, where "n" is the number of seconds to wait for a 
  2630.             response.  If no keystroke is entered by the end of the timeout 
  2631.             period, INKEY returns with the variable unchanged.  You can specify 
  2632.             /W0 to check if a keystroke is waiting, and return immediately. 
  2633.  
  2634.  ASCII values from 1 to 255 are stored as a character.  Extended characters 
  2635.  (for example, function keys & cursor keys) are stored as a string in decimal 
  2636.  format, with a leading @ (for example, the F1 key is stored as @59).  See 
  2637.  KEYCODES for the common extended keystrokes. 
  2638.  
  2639.  INKEY and INPUT are normally used as batch file commands, allowing you great 
  2640.  flexibility in entering or changing batch variables. 
  2641.  
  2642.  If you press ^C or ^BREAK while INKEY is waiting for a key, execution of an 
  2643.  alias will be terminated, and execution of a batch file will be suspended 
  2644.  while you are prompted whether to cancel the batch job. 
  2645.  
  2646.  See also INPUT. 
  2647.  
  2648.  EXAMPLES 
  2649.  
  2650.  Prompt for a number and store it in the variable NUM: 
  2651.  
  2652.       inkey /K"123456789" Enter a number from 1 to 9:  %%num
  2653.  
  2654.  The following batch file fragment waits up to 10 seconds for a character, then 
  2655.  tests to see if a "Y" was entered: 
  2656.  
  2657.       set net=N
  2658.       inkey /w10 Do you want to load the network (Y/N)? %%net
  2659.       if "%net"=="Y" goto load_net
  2660.  
  2661.  
  2662. ΓòÉΓòÉΓòÉ 3.41. INPUT - Enter environment variable ΓòÉΓòÉΓòÉ
  2663.  
  2664. SYNTAX     (Internal 4OS2) 
  2665.  
  2666. INPUT [/Wn] [text] %%varname
  2667.  
  2668. PURPOSE 
  2669.  
  2670. Enter an environment variable from the standard input. 
  2671.  
  2672. COMMENTS 
  2673.  
  2674. You can optionally display prompt text before the variable name. 
  2675.  
  2676. The only INPUT option is: 
  2677.  
  2678.     /W      Specify a timeout period, where "n" is the number of seconds to 
  2679.             wait for a response.  If no keystroke is entered by the end of the 
  2680.             timeout period, INPUT returns with the variable unchanged.  If you 
  2681.             enter a key before the timeout period, INPUT will wait indefinitely 
  2682.             for the remainder of the line.  You can specify /W0 to check if a 
  2683.             key is already in the buffer, and return immediately. 
  2684.  
  2685.  All characters entered up to, but not including, the carriage return are 
  2686.  stored in the variable. 
  2687.  
  2688.  INPUT and INKEY are normally used as batch file commands, allowing you great 
  2689.  flexibility in entering or changing batch variables. 
  2690.  
  2691.  See also INKEY. 
  2692.  
  2693.  EXAMPLES 
  2694.  
  2695.  The following batch file fragment prompts for a string and stores it in the 
  2696.  variable FNAME: 
  2697.  
  2698.       input Enter the file name:  %%fname
  2699.  
  2700.  
  2701. ΓòÉΓòÉΓòÉ 3.42. KEYS - Display command history ΓòÉΓòÉΓòÉ
  2702.  
  2703. SYNTAX     (Internal 4OS2) 
  2704.  
  2705. KEYS [ON | OFF | LIST]
  2706.  
  2707. PURPOSE 
  2708.  
  2709. Display the history list, or enable/disable the command line editing keys. 
  2710.  
  2711. COMMENTS 
  2712.  
  2713. 4OS2 includes this command for compatibility with CMD.EXE; for 4OS2 you should 
  2714. use the HISTORY command instead. 
  2715.  
  2716.  
  2717. ΓòÉΓòÉΓòÉ 3.43. LIST - Display files ΓòÉΓòÉΓòÉ
  2718.  
  2719. SYNTAX     (Internal 4OS2) 
  2720.  
  2721. LIST [/H /S /W] [d:][path]filename...
  2722.  
  2723. PURPOSE 
  2724.  
  2725. Display a file with forward and backward paging and scrolling. 
  2726.  
  2727. COMMENTS 
  2728.  
  2729. LIST provides a much faster and more flexible way to view a file than TYPE, 
  2730. without the overhead of using a text editor. 
  2731.  
  2732. The LIST options are: 
  2733.  
  2734.     /H        Strip the high bit from each character before displaying.  This 
  2735.               is useful when displaying files created by some word processors 
  2736.               that turn on the high bit for formatting purposes. 
  2737.  
  2738.     /S        Read from the standard input rather than a file.  This allows you 
  2739.               to redirect command output and view it with LIST. 
  2740.  
  2741.     /W        Wrap the text at the right margin.  This option is useful when 
  2742.               displaying non-text files. 
  2743.  
  2744.  LIST uses the cursor pad to scroll through the file.  The LIST commands are 
  2745.  (the caret ^ means press the Ctrl key together with the specified key): 
  2746.  
  2747.     HOME      Display the first page of the file 
  2748.     END       Display the last page of the file 
  2749.     PgUp      Scroll back one page 
  2750.     PgDn      Scroll forwards one page 
  2751.     Esc       Exit the current file 
  2752.     ^C        Quit LIST 
  2753.              Scroll up one line 
  2754.              Scroll down one line 
  2755.              Scroll left 8 columns 
  2756.              Scroll right 8 columns 
  2757.     ^        Scroll left 40 columns 
  2758.     ^        Scroll right 40 columns 
  2759.     F1        Call the on-line help 
  2760.     F         Prompt and search for a string (case is ignored) 
  2761.     H         Toggle the "strip high bit" (/H) option 
  2762.     N         Find next matching string (case is ignored).  LIST saves the 
  2763.               search string, so you can LIST multiple files and search for the 
  2764.               same string by pressing N in each file. 
  2765.     P         Print the file on LPT1 
  2766.     W         Toggle the "line wrap" (/W) option 
  2767.  
  2768.  LIST is normally only useful for displaying ASCII text files; executable files 
  2769.  (.COM and .EXE) and many data files will be unreadable due to the presence of 
  2770.  non-alphanumeric characters. 
  2771.  
  2772.  See also TYPE. 
  2773.  
  2774.  EXAMPLES 
  2775.  
  2776.  Display the file MEMO.DOC: 
  2777.  
  2778.       list memo.doc
  2779.  
  2780.  Display the output from a DIR command: 
  2781.  
  2782.       dir | list /s
  2783.  
  2784.  
  2785. ΓòÉΓòÉΓòÉ 3.44. LOADBTM - Change batch file mode ΓòÉΓòÉΓòÉ
  2786.  
  2787. SYNTAX     (Internal 4OS2) 
  2788.  
  2789. LOADBTM [on | off]
  2790.  
  2791. PURPOSE 
  2792.  
  2793. Switch a batch file to or from .BTM mode. 
  2794.  
  2795. COMMENTS 
  2796.  
  2797. LOADBTM switches a batch file (.CMD or .BTM) to and from .BTM mode. If no 
  2798. argument is given, it displays the current LOADBTM status. 
  2799.  
  2800. .BTM mode runs from two to five times faster than normal batch mode, but should 
  2801. not be used for self-modifying batch files. 
  2802.  
  2803. LOADBTM can only be used within a .CMD or .BTM file. 
  2804.  
  2805. See the 4OS2 / 4DOS manual for more information on .BTM files. 
  2806.  
  2807. EXAMPLES 
  2808.  
  2809. The following .CMD batch file fragment tests if 4OS2 is the current command 
  2810. processor; if so, it switches to BTM mode: 
  2811.  
  2812.     Rem The initial default state is LOADBTM OFF
  2813.     if "%@eval[2+2]" == "4" loadbtm on
  2814.  
  2815.  
  2816. ΓòÉΓòÉΓòÉ 3.45. LOG - Log commands to file ΓòÉΓòÉΓòÉ
  2817.  
  2818. SYNTAX     (Internal 4OS2) 
  2819.  
  2820. LOG [/W [d:]pathname] [ON | OFF | "text"]
  2821.  
  2822. PURPOSE 
  2823.  
  2824. Save a log of commands to a disk file. 
  2825.  
  2826. COMMENTS 
  2827.  
  2828. The default 4OS2 LOG filename is 4OS2LOG in the root directory of the boot 
  2829. drive.  The LOG status and log filename will be passed to secondary shells. 
  2830.  
  2831. Entering LOG with no parameters displays the log status (ON or OFF). Entering 
  2832. LOG with text writes the text to the log file, even if LOG is set OFF.  This 
  2833. allows you to enter headers in the log file. 
  2834.  
  2835. You can specify a different filename with the /W(rite) option.  /W 
  2836. automatically enables command logging. 
  2837.  
  2838. The commands are stored in the log file as they are executed, after performing 
  2839. any alias or variable expansion. 
  2840.  
  2841. The LOG file format looks like: 
  2842.  
  2843.     [mm/dd/yy  hh:mm:ss] command.
  2844.  
  2845. EXAMPLES 
  2846.  
  2847. Display the LOG status: 
  2848.  
  2849.     log
  2850.  
  2851. Enable command logging: 
  2852.  
  2853.     log on
  2854.  
  2855. Enable command logging to the file C:\LOG\LOGFILE and insert a header: 
  2856.  
  2857.     log /w c:\log\logfile
  2858.     log "Started work on the database system"
  2859.  
  2860.  
  2861. ΓòÉΓòÉΓòÉ 3.46. MD or MKDIR - Create subdirectory ΓòÉΓòÉΓòÉ
  2862.  
  2863. SYNTAX     (Internal 4OS2) 
  2864.  
  2865. MD [d:]pathname...
  2866. MKDIR [d:]pathname...
  2867.  
  2868. PURPOSE 
  2869.  
  2870. Create subdirectories. 
  2871.  
  2872. COMMENTS 
  2873.  
  2874. To start at the root directory, start the pathname with a backslash (\). To 
  2875. start at the parent directory, start the pathname with two periods (..). All 
  2876. other pathnames start at the current directory. 
  2877.  
  2878. See also RD. 
  2879.  
  2880. EXAMPLES 
  2881.  
  2882. Create a subdirectory called MYDIR in the root directory: 
  2883.  
  2884.     md \mydir
  2885.  
  2886.  
  2887. ΓòÉΓòÉΓòÉ 3.47. MEMORY - Display system memory ΓòÉΓòÉΓòÉ
  2888.  
  2889. SYNTAX     (Internal 4OS2) 
  2890.  
  2891. MEMORY
  2892.  
  2893. PURPOSE 
  2894.  
  2895. Display the system RAM status. 
  2896.  
  2897. COMMENTS 
  2898.  
  2899. MEMORY displays the free RAM, the total and free environment space, the total 
  2900. and free alias list space, and the total command history space. 
  2901.  
  2902. EXAMPLES 
  2903.  
  2904. Display your RAM totals: 
  2905.  
  2906.     memory
  2907.  
  2908.  
  2909. ΓòÉΓòÉΓòÉ 3.48. MOVE - Move files ΓòÉΓòÉΓòÉ
  2910.  
  2911. SYNTAX     (Internal 4OS2) 
  2912.  
  2913. MOVE [d:][path]filename... [d:][path][filename]
  2914.     [/C /D /H /N /P /Q /R /S /U]
  2915.  
  2916. PURPOSE 
  2917.  
  2918. Move files to other directories and drives. 
  2919.  
  2920. COMMENTS 
  2921.  
  2922. The MOVE command moves the specified file(s) to the last filename specified, 
  2923. which is designated as the target.  If the target already exists, it is deleted 
  2924. when the file is moved.  You cannot move a file to itself. 
  2925.  
  2926. If there is more than one source file specification, the target must be a 
  2927. directory, and the files are moved to the directory with their original 
  2928. filenames.  If the target is not a directory, MOVE will display an error 
  2929. message and exit. 
  2930.  
  2931. Use caution when using MOVE commands with commands like SELECT.  If multiple 
  2932. files are selected and the target is not a subdirectory, each file will be 
  2933. moved in turn to the target, overwriting the previous file. The net result is 
  2934. that all files but the last will be deleted.  If SELECT is invoked using square 
  2935. brackets instead of parentheses, the MOVE will be done in a single command and 
  2936. MOVE will detect the error. 
  2937.  
  2938. The MOVE options are: 
  2939.  
  2940.     /C      Move only files that exist in the target directory, and where the 
  2941.             source file is newer than the target. 
  2942.  
  2943.     /D      The target must be a directory.  If it doesn't exist, you will be 
  2944.             prompted whether to create it. 
  2945.  
  2946.     /H      Move all files, including hidden & system. 
  2947.  
  2948.     /N      Do everything except actually move the file(s) (for testing what 
  2949.             the result of a MOVE would be). 
  2950.  
  2951.     /P      Prompt for a Y or N response to confirm each move. 
  2952.  
  2953.     /Q      Don't display filenames as they are moved. 
  2954.  
  2955.     /R      Prompt for a Y or N response before overwriting an existing file. 
  2956.  
  2957.     /S      Move an entire subdirectory tree to another location.  The target 
  2958.             directories will be created if they don't exist (except for the 
  2959.             first target, which must already exist).  MOVE will remove empty 
  2960.             subdirectories after the move. 
  2961.  
  2962.     /U      Move only those files that either don't exist in the target 
  2963.             directory, or where the source file is newer than the target. 
  2964.  
  2965.  MOVE first attempts to rename the file(s).  If that fails (the target is on a 
  2966.  different drive, or the target already exists), MOVE will copy the file(s) and 
  2967.  then delete the originals.  If MOVE cannot delete the original (for example, a 
  2968.  read-only file), it will display an error message, but the target file is 
  2969.  still created. 
  2970.  
  2971.  See also COPY and REN. 
  2972.  
  2973.  EXAMPLES 
  2974.  
  2975.  Move some files to a different directory: 
  2976.  
  2977.       move *.wks *.txt c:\finance\myfiles
  2978.  
  2979.  Move all the files in the current directory to A:\, prompting before 
  2980.  overwriting any existing files: 
  2981.  
  2982.       move /r *.* a:\
  2983.  
  2984.  
  2985. ΓòÉΓòÉΓòÉ 3.49. PATH - Set executable file search path ΓòÉΓòÉΓòÉ
  2986.  
  2987. SYNTAX     (Internal 4OS2) 
  2988.  
  2989. PATH [[d:]path][[;[d:]path]...]]
  2990. PATH ;
  2991.  
  2992. PURPOSE 
  2993.  
  2994. Tells 4OS2 where to search for executable and batch files not in the current 
  2995. directory. 
  2996.  
  2997. COMMENTS 
  2998.  
  2999. When searching for an external command (.COM, .EXE, .BTM, and .CMD, in that 
  3000. order), 4OS2 searches the current directory first, then the directories you 
  3001. specify in the PATH, in the order you list them. The directory names are 
  3002. separated by semicolons (; ). 
  3003.  
  3004. In OS/2 2.0, 4OS2 will also search for MS-DOS .BAT files (following .CMD in the 
  3005. search order), for compatibility with CMD.EXE. 
  3006.  
  3007. If you enter PATH with no parameters, PATH displays the current search path. 
  3008. If you enter PATH and a semicolon, PATH clears the search path and will search 
  3009. only the current directory (this is the default at system startup). 
  3010.  
  3011. If you specify an invalid directory, 4OS2 will skip that directory and continue 
  3012. searching with the next directory in the path. 
  3013.  
  3014. If you have a directory '.' in the PATH, 4OS2 will not search the current 
  3015. directory first, but will wait to do so until it reaches that point in the 
  3016. PATH. 
  3017.  
  3018. Some applications also use the PATH variable to search for their files. 
  3019.  
  3020. You can edit an existing path with the ESET command. 
  3021.  
  3022. EXAMPLES 
  3023.  
  3024. The following PATH command sets the search path to the following order: the 
  3025. current directory, the root directory on drive C, the OS2 subdirectory on drive 
  3026. C, and the UTIL subdirectory on drive C: 
  3027.  
  3028.     path c:\;c:\os2;c:\util
  3029.  
  3030. Display the current search path: 
  3031.  
  3032.     path
  3033.  
  3034.  
  3035. ΓòÉΓòÉΓòÉ 3.50. PAUSE - Wait for keystroke ΓòÉΓòÉΓòÉ
  3036.  
  3037. SYNTAX     (Internal 4OS2) 
  3038.  
  3039. PAUSE [message]
  3040.  
  3041. PURPOSE 
  3042.  
  3043. Suspend alias or batch file execution. 
  3044.  
  3045. COMMENTS 
  3046.  
  3047. A PAUSE command will suspend execution, giving you the opportunity to perform 
  3048. activities such as changing disks, turning on the printer, etc. 
  3049.  
  3050. PAUSE waits for any key (except ^C or ^BREAK) to be pressed and then continues 
  3051. executing.  If a prompt message is specified, PAUSE will display the message 
  3052. and wait for a keystroke.  Otherwise, PAUSE will prompt: 
  3053.  
  3054.     Press a key when ready...
  3055.  
  3056. If you press a ^C or ^BREAK while PAUSE is waiting for a key, execution of an 
  3057. alias will be terminated, and execution of a batch file will be suspended while 
  3058. you are prompted whether to cancel the batch file. 
  3059.  
  3060. EXAMPLES 
  3061.  
  3062. The following batch file fragment prompts the user before erasing files: 
  3063.  
  3064.     pause ^C aborts, any other key erases the .LST files:
  3065.     erase *.lst
  3066.  
  3067.  
  3068. ΓòÉΓòÉΓòÉ 3.51. POPD - Restore saved directory ΓòÉΓòÉΓòÉ
  3069.  
  3070. SYNTAX     (Internal 4OS2) 
  3071.  
  3072. POPD [*]
  3073.  
  3074. PURPOSE 
  3075.  
  3076. Change to the disk drive and directory at the top of the directory stack. 
  3077.  
  3078. COMMENTS 
  3079.  
  3080. POPD restores the disk and directory saved using PUSHD (most recent first). 
  3081.  
  3082. The * option clears the directory stack, without changing the current drive and 
  3083. directory. 
  3084.  
  3085. Use the DIRS command to display the directory stack. 
  3086.  
  3087. See also DIRS and PUSHD. 
  3088.  
  3089. EXAMPLES 
  3090.  
  3091. Save and change your disk drive with PUSHD, and then restore it: 
  3092.  
  3093.     pushd d:\database\test
  3094.     popd
  3095.  
  3096. Clear the directory stack: 
  3097.  
  3098.     popd *
  3099.  
  3100.  
  3101. ΓòÉΓòÉΓòÉ 3.52. PROMPT - Change command prompt ΓòÉΓòÉΓòÉ
  3102.  
  3103. SYNTAX     (Internal 4OS2) 
  3104.  
  3105. PROMPT [text]
  3106.  
  3107. PURPOSE 
  3108.  
  3109. Change the command line prompt. 
  3110.  
  3111. COMMENTS 
  3112.  
  3113. If you enter PROMPT with no parameters, PROMPT sets the prompt on drives A and 
  3114. B to $n$g (display current disk only), and on all other drives to $p$g (display 
  3115. current disk and directory). 
  3116.  
  3117. The prompt text can contain special strings of the form $?, where ? is one of 
  3118. the following: 
  3119.  
  3120.     b      The | character 
  3121.     c      The open parenthesis ( 
  3122.     D      Current date, in the format:  Fri  Dec 25, 1992 
  3123.     d      Current date, in the format:  Fri  12-25-92 
  3124.     e      The ASCII ESC character (decimal 27) 
  3125.     f      The close parenthesis ) 
  3126.     g      The > character 
  3127.     h      BACKSPACE over the previous character 
  3128.     i      The default OS/2 line 0 prompt 
  3129.     l      The < character 
  3130.     n      Default drive letter 
  3131.     P      Current disk and directory (upper case) 
  3132.     p      Current disk and directory (lower case) 
  3133.     q      The = character 
  3134.     s      The space character 
  3135.     t      Current time, in the format hh:mm:ss 
  3136.     v      OS/2 version number, in the format:  2.0 
  3137.     Xd:    Current disk and directory (upper case) where d: is the drive 
  3138.            specification 
  3139.     xd:    Current disk and directory (lower case) where d: is the drive 
  3140.            specification 
  3141.     z      Display the current shell nesting level (you must be running 4OS2 as 
  3142.            the primary shell in swapping mode).  The primary command processor 
  3143.            is 0. 
  3144.     $      The $ character 
  3145.     _      CR/LF (go to beginning of new line) 
  3146.  
  3147.  You can embed any environment variable, internal variable, or variable 
  3148.  function in your PROMPT string to view system status or resources.  When 
  3149.  defining the PROMPT to include variables of this type, use two % signs before 
  3150.  the variable name, or enclose the prompt string in back-quotes [`] (if you 
  3151.  don't, the prompt display will show the value the variable had when the prompt 
  3152.  was defined, not the value at the moment the prompt is displayed).  For 
  3153.  example, to show free RAM to the left of the standard $p$g prompt: 
  3154.  
  3155.       prompt [%%@dosmem[K]K] $p$g
  3156.         or
  3157.       prompt `[%@dosmem[K]K] $p$g`
  3158.  
  3159.  See 4OS2 Internal Variables and 4OS2 Variable Functions for lists of the 
  3160.  available variables and functions. 
  3161.  
  3162.  See also ANSI. 
  3163.  
  3164.  EXAMPLES 
  3165.  
  3166.  Set the prompt to the current date and time: 
  3167.  
  3168.       prompt $d $t $g
  3169.  
  3170.  
  3171. ΓòÉΓòÉΓòÉ 3.53. PUSHD - Save & change directory ΓòÉΓòÉΓòÉ
  3172.  
  3173. SYNTAX     (Internal 4OS2) 
  3174.  
  3175. PUSHD [[d:]pathname]
  3176.  
  3177. PURPOSE 
  3178.  
  3179. Save the current disk and directory. 
  3180.  
  3181. COMMENTS 
  3182.  
  3183. PUSHD saves the current directory on the directory stack, and if a pathname is 
  3184. specified on the command line, changes the disk drive and directory. The 
  3185. directory stack can hold up to 255 characters (about 10 to 20 entries). If you 
  3186. exceed the directory stack size, the oldest directory is removed before adding 
  3187. the current directory. 
  3188.  
  3189. The saved directory is restored on a "last in, first out" basis by the POPD 
  3190. command.  The directory stack can be displayed with the DIRS command. 
  3191.  
  3192. See also DIRS and POPD. 
  3193.  
  3194. EXAMPLES 
  3195.  
  3196. Save the current directory and change to C:\WORDP\MEMOS: 
  3197.  
  3198.     pushd c:\wordp\memos
  3199.  
  3200.  
  3201. ΓòÉΓòÉΓòÉ 3.54. QUIT - Quit batch file ΓòÉΓòÉΓòÉ
  3202.  
  3203. SYNTAX     (Internal 4OS2) 
  3204.  
  3205. QUIT [value]
  3206.  
  3207. PURPOSE 
  3208.  
  3209. Terminate the current batch file. 
  3210.  
  3211. COMMENTS 
  3212.  
  3213. You can QUIT at any point in a batch file, not just the end.  If you QUIT a 
  3214. batch file called from another batch file, you will be returned to the previous 
  3215. file at the command following the original call.  To end all batch file 
  3216. processing, use CANCEL.  If you specify a value, QUIT will set the ERRORLEVEL 
  3217. to that value.  The value also affects the internal variable %_?, and the 
  3218. conditional command separators && and ||. 
  3219.  
  3220. You can also use QUIT in an alias.  If you QUIT an alias while inside a batch 
  3221. file, QUIT will end both the alias and the batch file. 
  3222.  
  3223. See also CANCEL. 
  3224.  
  3225. EXAMPLES 
  3226.  
  3227. Check to see if the user entered "quit" and exit if true: 
  3228.  
  3229.     input Enter your choice:  %%option
  3230.     if "%option" == "quit" quit
  3231.  
  3232.  
  3233. ΓòÉΓòÉΓòÉ 3.55. RD or RMDIR - Remove subdirectory ΓòÉΓòÉΓòÉ
  3234.  
  3235. SYNTAX     (Internal 4OS2) 
  3236.  
  3237. RD [d:]path...
  3238. RMDIR [d:]path...
  3239.  
  3240. PURPOSE 
  3241.  
  3242. Remove one or more directories. 
  3243.  
  3244. COMMENTS 
  3245.  
  3246. Before removing a subdirectory, you must delete all the files and 
  3247. subdirectories (and their files) in that directory (including any hidden or 
  3248. read-only files). 
  3249.  
  3250. You can use wildcard characters in the directory names. 
  3251.  
  3252. You cannot remove the root directory (\), the current directory (.), or the 
  3253. parent directory (..). 
  3254.  
  3255. See also MD. 
  3256.  
  3257. EXAMPLES 
  3258.  
  3259. Remove the subdirectory MEMOS from the directory WP on the current drive: 
  3260.  
  3261.     rmdir \wp\memos
  3262.  
  3263.  
  3264. ΓòÉΓòÉΓòÉ 3.56. REBOOT - Reboot system ΓòÉΓòÉΓòÉ
  3265.  
  3266. SYNTAX     (Internal 4OS2) 
  3267.  
  3268. REBOOT [/V]
  3269.  
  3270. PURPOSE 
  3271.  
  3272. Do a warm or cold reboot. 
  3273.  
  3274. COMMENTS 
  3275.  
  3276. REBOOT defaults to performing a warm boot, without any prompting.  The options 
  3277. are: 
  3278.  
  3279.     /V      Prompt for confirmation (Y or N) before rebooting. 
  3280.  
  3281.  REBOOT flushes the disk buffers, resets the drives, and waits one second 
  3282.  before rebooting the system, to allow disk caching programs to finish writing 
  3283.  any cached data. 
  3284.  
  3285.  EXAMPLES 
  3286.  
  3287.  The following command prompts you to verify the reboot, then does a cold boot: 
  3288.  
  3289.       reboot /v /c
  3290.  
  3291.  
  3292. ΓòÉΓòÉΓòÉ 3.57. REM - Batch file comment ΓòÉΓòÉΓòÉ
  3293.  
  3294. SYNTAX     (Internal 4OS2) 
  3295.  
  3296. REM [comment]
  3297.  
  3298. PURPOSE 
  3299.  
  3300. Put a comment in a batch file. 
  3301.  
  3302. COMMENTS 
  3303.  
  3304. If ECHO is ON, or the SETDOS /V option is set, REM will echo the comment. 
  3305. Otherwise, REM will ignore it. If you don't want to echo the line, preface REM 
  3306. with the @ character. (Setting SETDOS /V to 2 will echo all lines, regardless 
  3307. of the echo state or @ symbols.)  The current ECHO state is inherited by called 
  3308. batch files. 
  3309.  
  3310. Enter your comment following the REM, separated by a space or tab. Comments can 
  3311. be up to 295 characters.  Everything following a REM will be ignored, including 
  3312. quote characters, the redirection symbols (|><) and the command separator 
  3313. character.  An alternate way to put a comment in a batch file is to begin the 
  3314. line with a colon (:). The line will be interpreted as a label and ignored. 
  3315. (Make sure you don't have any actual labels beginning with the same word!) 
  3316.  
  3317. Batch file comments are useful for documenting the purpose for a batch file and 
  3318. the procedures used. 
  3319.  
  3320. EXAMPLES 
  3321.  
  3322. Enter comments in a batch file: 
  3323.  
  3324.     rem This batch file provides a menu-based system
  3325.     rem   for accessing the rem word processing utilities.
  3326.     rem Clear the screen and get a selection
  3327.     cls
  3328.  
  3329.  
  3330. ΓòÉΓòÉΓòÉ 3.58. REN or RENAME - Rename files ΓòÉΓòÉΓòÉ
  3331.  
  3332. SYNTAX     (Internal 4OS2) 
  3333.  
  3334. REN [/N /P /Q] [d:][path]filename... [d:][path]filename
  3335. RENAME [/N /P /Q] [d:][path]filename... [d:][path]filename
  3336.  
  3337. PURPOSE 
  3338.  
  3339. Rename files or subdirectories. 
  3340.  
  3341. COMMENTS 
  3342.  
  3343. The last filename is the new name; preceding names are the files or directories 
  3344. to be renamed.  You can use wildcard characters in the filenames.  The new 
  3345. filename must not already exist.  You cannot rename a subdirectory to a new 
  3346. path! 
  3347.  
  3348. The REN options are: 
  3349.  
  3350.     /N      Do everything except actually rename the file(s) (for testing what 
  3351.             the result of a REN would be). 
  3352.  
  3353.     /P      Confirm each rename (Y or N). 
  3354.  
  3355.     /Q      Don't display filenames as they are renamed. 
  3356.  
  3357.  REN in CMD.EXE only allows a path to be specified with the first file name; 
  3358.  the path for the target is always the same as the source.  4OS2 allows you to 
  3359.  optionally select the target path, renaming the source file to a new directory 
  3360.  on the same disk drive.  If you don't specify a path for the target, REN will 
  3361.  assume a "CMD.EXE compatible RENAME" and will rename the source file to the 
  3362.  new name without moving it to another directory. 
  3363.  
  3364.  If you want to rename to a different drive, use MOVE. 
  3365.  
  3366.  See also MOVE. 
  3367.  
  3368.  EXAMPLES 
  3369.  
  3370.  Rename the file MEMO.TXT to OFFICE.TXT: 
  3371.  
  3372.       ren memo.txt office.txt
  3373.  
  3374.  Rename the directory \WORDPROC to \WP: 
  3375.  
  3376.       ren \wordproc \wp
  3377.  
  3378.  
  3379. ΓòÉΓòÉΓòÉ 3.59. RETURN - Return from batch subroutine ΓòÉΓòÉΓòÉ
  3380.  
  3381. SYNTAX     (Internal 4OS2) 
  3382.  
  3383. RETURN
  3384.  
  3385. PURPOSE 
  3386.  
  3387. Return from a GOSUB (subroutine) call in a batch file. 
  3388.  
  3389. COMMENTS 
  3390.  
  3391. The RETURN command returns from a GOSUB call to the command following the 
  3392. original GOSUB. 
  3393.  
  3394. See also GOSUB. 
  3395.  
  3396. EXAMPLES 
  3397.  
  3398. The following batch file fragment calls a subroutine that displays the current 
  3399. directory: 
  3400.  
  3401.     echo Calling a subroutine
  3402.     gosub subr1
  3403.     echo Returned from the subroutine
  3404.     quit
  3405.     :subr1
  3406.     dir /hw
  3407.     return
  3408.  
  3409.  
  3410. ΓòÉΓòÉΓòÉ 3.60. SCREEN - Position cursor ΓòÉΓòÉΓòÉ
  3411.  
  3412. SYNTAX     (Internal 4OS2) 
  3413.  
  3414. SCREEN row column [message]
  3415.  
  3416. PURPOSE 
  3417.  
  3418. Position the cursor on the screen, and optionally display a message. 
  3419.  
  3420. COMMENTS 
  3421.  
  3422. The row and column numbering is zero-based, so on a standard 25 line by 80 
  3423. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  3424.  
  3425. SCREEN does not change the default screen colors.  To display text in specific 
  3426. colors, use SCRPUT. 
  3427.  
  3428. SCREEN checks for a valid row and column, and displays an error message if 
  3429. either value is out of range. 
  3430.  
  3431. See also ECHO, SCRPUT, TEXT, and VSCRPUT. 
  3432.  
  3433. EXAMPLES 
  3434.  
  3435. The following batch file fragment displays a menu: 
  3436.  
  3437.     @echo off
  3438.     cls
  3439.     screen 3 10 Select a number from 1 to 4:
  3440.     screen 6 20 1 - Word Processing
  3441.     screen 7 20 2 - Spreadsheet
  3442.     screen 8 20 3 - Telecommunications
  3443.     screen 9 20 4 - Quit
  3444.  
  3445.  
  3446. ΓòÉΓòÉΓòÉ 3.61. SCRPUT - Display text in color ΓòÉΓòÉΓòÉ
  3447.  
  3448. SYNTAX     (Internal 4OS2) 
  3449.  
  3450. SCRPUT row column [bright] [blink] fg ON bg text
  3451.  
  3452. PURPOSE 
  3453.  
  3454. Display text in color. 
  3455.  
  3456. COMMENTS 
  3457.  
  3458. The row and column numbering is zero-based, so on a standard 25 line by 80 
  3459. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  3460.  
  3461. SCRPUT is similar to SCREEN, but allows you to specify the display colors, and 
  3462. writes directly to the screen. 
  3463.  
  3464. The parameters are: 
  3465.  
  3466.     row         Start row 
  3467.  
  3468.     column      Start column 
  3469.  
  3470.     fg          Foreground character color 
  3471.  
  3472.     bg          Background character color 
  3473.  
  3474.     text        The text to display 
  3475.  
  3476.  Only the first three characters of the color name and attributes ("bright" and 
  3477.  "blink") are required. 
  3478.  
  3479.  The available colors are: 
  3480.  
  3481.       Black      Blue      Green      Red
  3482.       Magenta    Cyan      Yellow     White
  3483.  
  3484.  See also ECHO, SCREEN, TEXT, and VSCRPUT. 
  3485.  
  3486.  EXAMPLES 
  3487.  
  3488.  The following batch file fragment displays a menu in color: 
  3489.  
  3490.       @echo off & cls white on blue
  3491.       scrput 3 10 bri white on blue Select a number from 1 to 4:
  3492.       scrput 6 20 bri red on blue 1 - Word Processing
  3493.       scrput 7 20 bri yellow on blue 2 - Spreadsheet
  3494.       scrput 8 20 bri green on blue 3 - Telecommunications
  3495.       scrput 9 20 bri magenta on blue 4 - Quit
  3496.  
  3497.  
  3498. ΓòÉΓòÉΓòÉ 3.62. SELECT - Select files for command ΓòÉΓòÉΓòÉ
  3499.  
  3500. SYNTAX     (Internal 4OS2) 
  3501.  
  3502. SELECT [/A[:-rhsda] /C /D /O:-deginrsu] command ([path]filename)
  3503.  
  3504. PURPOSE 
  3505.  
  3506. Execute a command on the specified files. 
  3507.  
  3508. COMMENTS 
  3509.  
  3510. SELECT allows you to select command line file arguments by marking the files 
  3511. using a full-screen "point-and-shoot" display.  SELECT substitutes the selected 
  3512. files for the argument enclosed in parentheses, and executes the command for 
  3513. each marked file.  If you specify multiple arguments in the parentheses, SELECT 
  3514. will display the matching files for the first argument, prompt you to mark the 
  3515. files, execute the command for each marked file, and then continue the same 
  3516. procedure with the next argument. 
  3517.  
  3518. The SELECT options are: 
  3519.  
  3520.     /A      Display only those files that have the specified attribute set. 
  3521.             Preceding the attribute character with a '-' will display those 
  3522.             files that DON'T  have that attribute set.  Attributes can also be 
  3523.             combined.  The attributes are: 
  3524.               R  Read only 
  3525.               H  Hidden 
  3526.               S  System 
  3527.               D  Directory 
  3528.               A  Archive 
  3529.  
  3530.     /C      Display filenames in upper case. 
  3531.  
  3532.     /D      Disable directory colorization. 
  3533.  
  3534.     /O      Sort sequence, where ? can be any combination of the following: 
  3535.               -  Reverse the sort order for the next option 
  3536.               a  Sort by ASCII value rather than numeric value 
  3537.               d  Sort by date and time (oldest first) 
  3538.               e  Sort by extension 
  3539.               g  Group subdirectories together 
  3540.               i  Sort by the file description 
  3541.               n  Sort by the filename (this is the default) 
  3542.               r  Reverse the sort order for all options 
  3543.               s  Sort by size 
  3544.               u  Unsorted 
  3545.  
  3546.  If you append filenames with a ; (an "include list"), SELECT will display the 
  3547.  matching filenames in a single listing.  Only the first filename in an include 
  3548.  list can have a path. 
  3549.  
  3550.  You can display the file and subdirectory names in color by setting the 
  3551.  COLORDIR variable.  The format for COLORDIR is: 
  3552.  
  3553.       ext [...]:[bright][blink] fg [ON bg]; ...
  3554.  
  3555.  where "ext" is the file extension, or one of the following file attributes: 
  3556.  
  3557.       DIRS - directory
  3558.       RDONLY - read-only file
  3559.       HIDDEN - hidden file
  3560.       SYSTEM - system file
  3561.       ARCHIVE - file modified since last backup
  3562.  
  3563.  For example, to display the .COM and .EXE files in red, the .C and .ASM files 
  3564.  in bright cyan, and the read-only files in blinking green: 
  3565.  
  3566.       set colordir=com exe:red; c asm:bright cyan; rdonly:blink green
  3567.  
  3568.  If you don't select a background color, SELECT will use the current screen 
  3569.  background color. 
  3570.  
  3571.  If you enclose the arguments in square brackets [ ] rather than parentheses, 
  3572.  SELECT will insert all of the arguments into the command line and only execute 
  3573.  the command once.  You must be careful not to exceed the maximum line length 
  3574.  (299 characters). 
  3575.  
  3576.  SELECT uses the cursor up, cursor down, PgUp, and PgDn keys to scroll through 
  3577.  the files matching the argument(s).  Use the + key to select a file, and the - 
  3578.  key to unselect a file.  The * key will reverse all of the current marks 
  3579.  (excluding subdirectories), and the / key will unmark everything.  After 
  3580.  marking the files, press ENTER to execute the command. You can select a single 
  3581.  file by moving the scroll bar to the filename and pressing ENTER. 
  3582.  
  3583.  To  cancel the SELECT command, type an Escape, ^C, or ^BREAK. 
  3584.  
  3585.  EXAMPLES 
  3586.  
  3587.  Select from the files in the current directory with the extension .COM, and 
  3588.  then from the files with the extension .EXE to copy to the root directory on 
  3589.  drive A: 
  3590.  
  3591.       select copy (*.com *.exe) a:\
  3592.  
  3593.  Select and run an executable program (.COM or .EXE) from files in the C:\UTIL 
  3594.  directory (an "include list"): 
  3595.  
  3596.       select (c:\util\*.com;*.exe)
  3597.  
  3598.  
  3599. ΓòÉΓòÉΓòÉ 3.63. SET - Display/Set environment variables ΓòÉΓòÉΓòÉ
  3600.  
  3601. SYNTAX     (Internal 4OS2) 
  3602.  
  3603. SET [/P] [/R [d:][path]filename...] [variable=[value]]
  3604.  
  3605. PURPOSE 
  3606.  
  3607. Display, create, modify, or delete environment variables. 
  3608.  
  3609. COMMENTS 
  3610.  
  3611. Entering SET with no variable or value displays the entire environment.  If you 
  3612. don't enter a value, SET will display the value of that variable. Otherwise, 
  3613. the variable and value are placed in the environment.  If the variable already 
  3614. exists, its old contents are replaced by the new value. Variable names are 
  3615. limited to a maximum of 80 characters, and the value to a maximum of 255 
  3616. characters.  The variable names are shifted to upper case before being stored 
  3617. in the environment; the value is stored exactly as entered. 
  3618.  
  3619. The SET options are: 
  3620.  
  3621.     /P      Pause after displaying a page of environment entries. Press ^C to 
  3622.             quit, or any other key to display the next page. 
  3623.  
  3624.     /R      Read environment variables from a file.  This is much faster than 
  3625.             loading variables in a batch file.  The file is in the same format 
  3626.             as the SET display, so SET /R can accept as input a file generated 
  3627.             by redirecting SET output. 
  3628.  
  3629.  For example, the following commands will save the environment variables to a 
  3630.  file, and then reload them from that file: 
  3631.  
  3632.       set > varlist
  3633.       set /r varlist
  3634.  
  3635.  You can load variables from multiple files by listing the filenames 
  3636.  individually after the /R. 
  3637.  
  3638.  You can add comments to a variable file by starting the comment line with a 
  3639.  colon (:). 
  3640.  
  3641.  You can remove multiple environment variables with the UNSET command, and edit 
  3642.  environment variables with the ESET command. 
  3643.  
  3644.  See also ESET and UNSET. 
  3645.  
  3646.  EXAMPLES 
  3647.  
  3648.  Display the current environment: 
  3649.  
  3650.       set
  3651.  
  3652.  Add a variable to the environment: 
  3653.  
  3654.       set mine=c:\finance\myfiles
  3655.  
  3656.  Remove a variable from the environment: 
  3657.  
  3658.       set mine=
  3659.  
  3660.  
  3661. ΓòÉΓòÉΓòÉ 3.64. SETDOS - Display/set configuration variables ΓòÉΓòÉΓòÉ
  3662.  
  3663. SYNTAX     (Internal 4OS2) 
  3664.  
  3665. SETDOS [/C? /E? /I+|-command /M? /N? /R? /S?:? /U? /V?]
  3666.  
  3667. PURPOSE 
  3668.  
  3669. Display or set 4OS2 configuration variables. 
  3670.  
  3671. COMMENTS 
  3672.  
  3673. These options can also be set in the initialization file (4OS2.INI).  Use 
  3674. SETDOS rather than the .INI file when you need to make temporary changes. 
  3675.  
  3676. The SETDOS options are: 
  3677.  
  3678.     /C      The COMPOUND variable is the character used for separating multiple 
  3679.             commands on the same line.  The default character is the ampersand 
  3680.             (&).  You cannot use any of the redirection characters (|><), or 
  3681.             the whitespace characters (blank, tab, comma, semicolon, or equal) 
  3682.             as the command separator. 
  3683.  
  3684.     /E      The ESCAPE variable is the character used to suppress the normal 
  3685.             meaning of the following character.  Any character following the 
  3686.             escape character will be passed unmodified to the command line. 
  3687.             The default escape character is the caret (^).  You cannot use any 
  3688.             of the redirection characters (|><) or the whitespace characters 
  3689.             (blank, tab, comma, semicolon, or equal) as the escape character. 
  3690.  
  3691.     /I      The INTERNAL variable allows you to disable or enable internal 4OS2 
  3692.             commands.  To disable a command, precede the command name with a 
  3693.             minus (-).  To reenable a command, precede it with a plus (+). 
  3694.  
  3695.     /M      The MODE variable controls the line editing mode. The default is 
  3696.             overstrike mode (/M0).  If MODE is set to 1, the default is insert 
  3697.             mode. 
  3698.  
  3699.     /N      The NOCLOBBER variable controls output redirection.  If NOCLOBBER 
  3700.             is set to 1, existing files may not be destroyed by output 
  3701.             redirection, and when appending with >>, the output file must 
  3702.             exist.  NOCLOBBER can be overridden with the ! character.  The 
  3703.             default value is 0. 
  3704.  
  3705.     /R      The ROWS variable determines the number of screen rows used by the 
  3706.             video display.  Normally 4OS2 detects the screen size, but if you 
  3707.             have a non-standard display you may need to set it explicitly.  The 
  3708.             ROWS variable does not affect screen scrolling (that is controlled 
  3709.             by your video BIOS and OS/2); it is used only for LIST, SELECT, the 
  3710.             paged output options (i.e., TYPE /P), and error checking in the 
  3711.             screen output commands. 
  3712.  
  3713.     /S      The SHAPE variable sets the default cursor shape.  The format is 
  3714.             /So:i, where "o" is the cursor size for overstrike mode, and "i" 
  3715.             the cursor size for insert mode.  The size is entered as a 
  3716.             percentage of the total character cell size.  The default values 
  3717.             are 10:100 (a thin underscore cursor for overstrike mode, and a 
  3718.             block cursor for insert mode).  Because of the way video BIOSes 
  3719.             remap the cursor, you may not get a smooth progression in the 
  3720.             cursor size from 0 - 100%. To disable the cursor, use /S0:0. 
  3721.  
  3722.     /U      The UPPER variable controls the way filenames are displayed for the 
  3723.             internal commands (COPY, DIR, etc.).  If UPPER is 1, filenames will 
  3724.             be displayed in upper case.  The default is /U0 (filenames will be 
  3725.             displayed in lower case). 
  3726.  
  3727.     /V      The VERBOSE variable controls command echoing in batch files.  If 
  3728.             VERBOSE is set to 0, batch files will NOT be echoed unless ECHO is 
  3729.             set ON.  The default is 1 (batch file commands WILL be echoed).  If 
  3730.             VERBOSE is set to 2, all batch file lines will be echoed, including 
  3731.             those prefaced by a '@', and when ECHO is OFF. 
  3732.  
  3733.  EXAMPLES 
  3734.  
  3735.  Change the COMPOUND character to a ~ (tilde): 
  3736.  
  3737.       setdos /c~
  3738.  
  3739.  Change MODE to insert, VERBOSE to off, and set NOCLOBBER on: 
  3740.  
  3741.       setdos /m1 /v0 /n1
  3742.  
  3743.  Disable the internal LIST command: 
  3744.  
  3745.       setdos /i-list
  3746.  
  3747.  
  3748. ΓòÉΓòÉΓòÉ 3.65. SETLOCAL - Save environment ΓòÉΓòÉΓòÉ
  3749.  
  3750. SYNTAX     (Internal 4OS2) 
  3751.  
  3752. SETLOCAL
  3753.  
  3754. PURPOSE 
  3755.  
  3756. Save a copy of the current disk drive, directory, and environment variables. 
  3757.  
  3758. COMMENTS 
  3759.  
  3760. SETLOCAL is used in batch files to save the disk drive, directory, and 
  3761. environment variables to a reserved block of memory.  You can then change their 
  3762. values, and later restore the original values with ENDLOCAL.  You cannot use 
  3763. SETLOCAL in an alias. 
  3764.  
  3765. SETLOCAL and ENDLOCAL are not nestable within the same batch file. However, you 
  3766. can have multiple SETLOCAL / ENDLOCAL pairs within a batch file, and nested 
  3767. batch files can each have their own SETLOCAL / ENDLOCAL. An ENDLOCAL will be 
  3768. automatically performed at the end of a batch file. 
  3769.  
  3770. Note that if you invoke a batch from another without using CALL, the first 
  3771. batch file is implicitly terminated, and an automatic ENDLOCAL performed. The 
  3772. second batch file will inherit the drive, directory, and environment variables 
  3773. as they were prior to the SETLOCAL. 
  3774.  
  3775. See also ENDLOCAL. 
  3776.  
  3777. EXAMPLES 
  3778.  
  3779. This batch file fragment saves the disk drive, directory, and environment 
  3780. variables, changes the disk and directory, modifies some variables, runs a 
  3781. program, and then restores the original values: 
  3782.  
  3783.     setlocal
  3784.     cdd d:\test & set path=c:\;c:\os;c:\util & set lib=d:\lib
  3785.     rem run some program here
  3786.     endlocal
  3787.  
  3788.  
  3789. ΓòÉΓòÉΓòÉ 3.66. SHIFT - Shift batch arguments ΓòÉΓòÉΓòÉ
  3790.  
  3791. SYNTAX     (Internal 4OS2) 
  3792.  
  3793. SHIFT [n]
  3794.  
  3795. PURPOSE 
  3796.  
  3797. Allow the use of more than 10 variables in a batch file. 
  3798.  
  3799. COMMENT 
  3800.  
  3801. SHIFT is provided for compatibility with CMD.EXE. It only supports 10 
  3802. parameters (%0 through %9); 4OS2 supports 128 (%0 to %127), so you may not need 
  3803. to use SHIFT for batch files running exclusively under 4OS2. 
  3804.  
  3805. SHIFT moves each batch file parameter n positions (i.e., if n is 1, then %1 
  3806. becomes %0, %2 becomes %1, etc.).  The default value for n is 1.  You can also 
  3807. reverse a SHIFT by giving a negative value for n (i.e., if n is -1, the former 
  3808. value for %0 is restored, %1 becomes %1, %1 becomes %2, etc.). 
  3809.  
  3810. SHIFT also affects the %$ (command line tail) and %# (number of command 
  3811. arguments) batch variables. 
  3812.  
  3813. EXAMPLES 
  3814.  
  3815. Create a batch file called TEST.BTM: 
  3816.  
  3817.     echo %1 %2 %3 %4
  3818.     shift
  3819.     echo %1 %2 %3 %4
  3820.     shift 2
  3821.     echo %1 %2 %3 %4
  3822.     shift -1
  3823.     echo %1 %2 %3 %4
  3824.  
  3825. Executing TEST.BTM with the arguments "zero one two three four five six" 
  3826. produces the following results: 
  3827.  
  3828.     zero one two three
  3829.     one two three four
  3830.     three four five six
  3831.     two three four five
  3832.  
  3833.  
  3834. ΓòÉΓòÉΓòÉ 3.67. START - Start new session ΓòÉΓòÉΓòÉ
  3835.  
  3836. SYNTAX     (Internal 4OS2) 
  3837.  
  3838. START ["title"] [/BG /C /DOS /F /FS /I /ICON=name /INV /K /L /MAX
  3839.     /MIN /N /PGM /PM /POS=x,y,x1,y1 /WIN] [command ...]
  3840.  
  3841. PURPOSE 
  3842.  
  3843. Start a program in a new OS/2 session. 
  3844.  
  3845. COMMENTS 
  3846.  
  3847. Entering START with no program name starts another 4OS2 session. 
  3848.  
  3849. START determines the application type automatically and starts it in the 
  3850. appropriate mode (full-screen, windowed, or PM).  If the program is a DOS app 
  3851. or Windows 3.x app, 4OS2 will either return an error message (in OS/2 1.3), or 
  3852. start the program in a VDM (in OS/2 2.0). 
  3853.  
  3854. You cannot start a batch file (.CMD or .BTM) with /PM; use /FS or /WIN. 
  3855.  
  3856. The START options are: 
  3857.  
  3858.     "title"     Specify the title to appear on the title bar and in the PM task 
  3859.                 list.  The title must be enclosed in double quotes and cannot 
  3860.                 exceed 60 characters.  If you don't specify a title, the 
  3861.                 program name is used. 
  3862.  
  3863.     /BG         Start as a background session. 
  3864.  
  3865.     /C          Start the application in a 4OS2 session, and end the session 
  3866.                 when the application finishes. 
  3867.  
  3868.     /DOS        (OS/2 2.0 only) Start a foreground DOS session. 
  3869.  
  3870.     /F          Start the session in the foreground.  The default is to start 
  3871.                 in the background, unless you specify /DOS, /FS, /WIN, or /PM. 
  3872.  
  3873.     /FS         Start a foreground full-screen session. 
  3874.  
  3875.     /I          Inherit the environment specified by the SET statements in 
  3876.                 CONFIG.SYS, rather than the current 4OS2 environment. 
  3877.  
  3878.     /ICON       Use the specified icon file. 
  3879.  
  3880.     /INV        Start the session as invisible (no icon; only accessible 
  3881.                 through the Task Manager or Window List). 
  3882.  
  3883.     /K          Start the application in a 4OS2 session, and keep the session 
  3884.                 when the application finishes.  This is the default for all 
  3885.                 non-PM applications. 
  3886.  
  3887.     /L          Start 4OS2 with local alias and history lists. 
  3888.  
  3889.     /MAX        Start the session maximized. 
  3890.  
  3891.     /MIN        Start the session minimized. 
  3892.  
  3893.     /N          Start the program directly without using 4OS2.EXE.  The command 
  3894.                 cannot be a batch file or internal command.  This is the 
  3895.                 default value for PM applications. 
  3896.  
  3897.     /PGM        The next argument is the program name, not a session name. 
  3898.  
  3899.     /PM         Start a foreground PM application. 
  3900.  
  3901.     /POS        Specify the start position (x,y), and the window size (x1,y1) 
  3902.                 in pels (the lower left corner is 0,0). 
  3903.  
  3904.     /WIN        Start a foreground windowed session. 
  3905.  
  3906.  If you specify a session type incompatible with the program (for example, a 
  3907.  /PM with a .CMD file), START will start the session in the default mode for 
  3908.  that program. 
  3909.  
  3910.  See also DETACH 
  3911.  
  3912.  EXAMPLES 
  3913.  
  3914.  Start a full-screen 4OS2 session: 
  3915.  
  3916.       start /fs
  3917.  
  3918.  Start 4DOS in a windowed DOS session (OS/2 2.0 only): 
  3919.  
  3920.       start /dos /win 4DOS.COM
  3921.  
  3922.  The "4DOS.COM" in this example is optional.  4OS2 will start 4DOS 
  3923.  automatically if no program name is given in a START /DOS command. 
  3924.  
  3925.  Start CHKDSK in a minimized background window session, without using 4OS2, and 
  3926.  with the title "Analyzing the disk": 
  3927.  
  3928.       start "Analyzing the disk" /bg /min /win /n chkdsk
  3929.  
  3930.  
  3931. ΓòÉΓòÉΓòÉ 3.68. TEE - Tee pipe fitting ΓòÉΓòÉΓòÉ
  3932.  
  3933. SYNTAX     (Internal 4OS2) 
  3934.  
  3935. TEE [/A] [d:][path]filename...
  3936.  
  3937. PURPOSE 
  3938.  
  3939. Copy standard input to standard output, and save a copy in the specified 
  3940. file(s). 
  3941.  
  3942. COMMENTS 
  3943.  
  3944. The only option for TEE is: 
  3945.  
  3946.     /A      Append output to the file(s) rather than overwriting it. 
  3947.  
  3948.  If you are typing at the keyboard, enter a ^Z to terminate the input. 
  3949.  
  3950.  TEE is often used to save the intermediate output of a pipe. 
  3951.  
  3952.  See also Y. 
  3953.  
  3954.  EXAMPLES 
  3955.  
  3956.  Search the file DOC for any lines containing the string "486", make a copy of 
  3957.  the matching lines in 4.DAT, and write them to the output file 486.DAT: 
  3958.  
  3959.       find "486" doc | tee 4.dat | sort > 486.dat
  3960.  
  3961.  
  3962. ΓòÉΓòÉΓòÉ 3.69. TEXT - Display text block ΓòÉΓòÉΓòÉ
  3963.  
  3964. SYNTAX     (Internal 4OS2) 
  3965.  
  3966. TEXT
  3967.  .
  3968.  .
  3969.  .
  3970. ENDTEXT
  3971.  
  3972. PURPOSE 
  3973.  
  3974. Display a block of text in a batch file. 
  3975.  
  3976. COMMENTS 
  3977.  
  3978. The TEXT command is useful for displaying menus or multiple-line messages. TEXT 
  3979. will display subsequent lines in the text until terminated by ENDTEXT. Both 
  3980. TEXT and ENDTEXT must be entered as the only command on that line. 
  3981.  
  3982. You can change screen colors by inserting ANSI escape sequences into the text 
  3983. block. 
  3984.  
  3985. See also ECHO, SCREEN, SCRPUT, and VSCRPUT. 
  3986.  
  3987. EXAMPLES 
  3988.  
  3989. The following batch file fragment displays a simple menu: 
  3990.  
  3991.     @echo off & cls & screen 2 0
  3992.     text
  3993.     Enter one of the following:
  3994.  
  3995.         1 - Spreadsheet
  3996.         2 - Word Processing
  3997.         3 - DOS Utilities
  3998.  
  3999.     Enter your selection:
  4000.     endtext
  4001.  
  4002.  
  4003. ΓòÉΓòÉΓòÉ 3.70. TIME - Set/Display time ΓòÉΓòÉΓòÉ
  4004.  
  4005. SYNTAX     (Internal 4OS2) 
  4006.  
  4007. TIME [hh:mm:ss]
  4008.  
  4009. PURPOSE 
  4010.  
  4011. Display or set the current system time. 
  4012.  
  4013. COMMENTS 
  4014.  
  4015. If you don't enter any parameters, TIME will display the current system time 
  4016. and prompt you for a new time.  Press ENTER if you don't wish to change the 
  4017. time, otherwise enter the new time. 
  4018.  
  4019. The parameters for the TIME command are: 
  4020.  
  4021.     hh      Hour (0 - 23) 
  4022.     mm      Minute (0 - 59) 
  4023.     ss      Second (0 - 59) 
  4024.  
  4025.  TIME defaults to 24-hour format; you can optionally enter the time in 12-hour 
  4026.  format by appending an "am" or "pm". 
  4027.  
  4028.  Whenever you create or modify a file, the system time is recorded in the 
  4029.  directory entry. 
  4030.  
  4031.  See also DATE, and TIMER. 
  4032.  
  4033.  EXAMPLES 
  4034.  
  4035.  Enter the time (9:30 am): 
  4036.  
  4037.       time 9:30
  4038.  
  4039.  To be prompted for the time: 
  4040.  
  4041.       time
  4042.  
  4043.  
  4044. ΓòÉΓòÉΓòÉ 3.71. TIMER - System stopwatch ΓòÉΓòÉΓòÉ
  4045.  
  4046. SYNTAX     (Internal 4OS2) 
  4047.  
  4048. TIMER [/1 /2 /3 /S] [ON]
  4049.  
  4050. PURPOSE 
  4051.  
  4052. System stopwatch. 
  4053.  
  4054. COMMENTS 
  4055.  
  4056. The TIMER command turns an internal stopwatch on and off.  The first time you 
  4057. run TIMER, the stopwatch starts.  When you run TIMER again, the stopwatch stops 
  4058. and the elapsed time is displayed.  There are three timers available (1, 2, and 
  4059. 3), so you can time multiple overlapping events.  The default timer is #1. 
  4060.  
  4061. The options for TIMER are: 
  4062.  
  4063.     ON      Force the timer to restart 
  4064.  
  4065.     /1      Use timer #1 
  4066.  
  4067.     /2      Use timer #2 
  4068.  
  4069.     /3      Use timer #3 
  4070.  
  4071.     /S      Display split time without stopping the timer 
  4072.  
  4073.  TIMER is particularly useful for timing events in batch files. 
  4074.  
  4075.  The smallest interval TIMER can measure 0.03 seconds; the largest interval is 
  4076.  23:59:59.99. 
  4077.  
  4078.  See also TIME. 
  4079.  
  4080.  EXAMPLES 
  4081.  
  4082.  Start or stop the timer: 
  4083.  
  4084.       timer
  4085.  
  4086.  Display a split time: 
  4087.  
  4088.       timer /s
  4089.  
  4090.  
  4091. ΓòÉΓòÉΓòÉ 3.72. TYPE - Display files ΓòÉΓòÉΓòÉ
  4092.  
  4093. SYNTAX     (Internal 4OS2) 
  4094.  
  4095. TYPE [/L /P] [d:][pathname]filename...
  4096.  
  4097. PURPOSE 
  4098.  
  4099. Display the contents of the specified file(s). 
  4100.  
  4101. COMMENTS 
  4102.  
  4103. The TYPE command displays a file.  Press ^S to suspend the display, and any 
  4104. character key to continue the display. 
  4105.  
  4106. The TYPE options are: 
  4107.  
  4108.     /L      Print line numbers preceding each line of text. 
  4109.  
  4110.     /P      Pause after each page.  Press ^C to quit, or any other key to 
  4111.             display the next page. 
  4112.  
  4113.  TYPE is normally only useful for displaying ASCII text files; executable files 
  4114.  (.COM and .EXE) and many data files will be unreadable due to the presence of 
  4115.  non-alphanumeric characters. 
  4116.  
  4117.  You will probably find LIST to be more useful for displaying files. 
  4118.  
  4119.  See also LIST. 
  4120.  
  4121.  EXAMPLES 
  4122.  
  4123.  Display the files MEMO1 and MEMO2, pausing at the end of each page: 
  4124.  
  4125.       type /p memo1 memo2
  4126.  
  4127.  
  4128. ΓòÉΓòÉΓòÉ 3.73. UNALIAS - Remove aliases ΓòÉΓòÉΓòÉ
  4129.  
  4130. SYNTAX     (Internal 4OS2) 
  4131.  
  4132. UNALIAS alias...
  4133. UNALIAS *
  4134.  
  4135. PURPOSE 
  4136.  
  4137. Remove aliases from the alias list. 
  4138.  
  4139. COMMENTS 
  4140.  
  4141. UNALIAS also accepts the wildcard character * to delete all aliases. 
  4142.  
  4143. See also ALIAS and ESET. 
  4144.  
  4145. EXAMPLES 
  4146.  
  4147. Remove the alias DDIR: 
  4148.  
  4149.     unalias ddir
  4150.  
  4151. Remove the aliases DDIR and ZAP: 
  4152.  
  4153.     unalias ddir zap
  4154.  
  4155. Remove all the aliases: 
  4156.  
  4157.     unalias *
  4158.  
  4159.  
  4160. ΓòÉΓòÉΓòÉ 3.74. UNSET - Remove environment variables ΓòÉΓòÉΓòÉ
  4161.  
  4162. SYNTAX     (Internal 4OS2) 
  4163.  
  4164. UNSET name...
  4165. UNSET *
  4166.  
  4167. PURPOSE 
  4168.  
  4169. Remove variables from the environment. 
  4170.  
  4171. COMMENTS 
  4172.  
  4173. UNSET also accepts the wildcard character * to delete all environment 
  4174. variables.  Use caution with UNSET *; many programs are dependent on 
  4175. environment variables.  (4OS2 relies on PATH and COMSPEC.) 
  4176.  
  4177. UNSET is often used in conjunction with SETLOCAL / ENDLOCAL in order to clear 
  4178. the environment of variables that may cause problems for some applications. 
  4179.  
  4180. See also ESET and SET. 
  4181.  
  4182. EXAMPLES 
  4183.  
  4184. Remove the variable CMDLINE: 
  4185.  
  4186.     unset cmdline
  4187.  
  4188. Remove the variables CMDLINE and PATH: 
  4189.  
  4190.     unset cmdline path
  4191.  
  4192. Remove all the environment variables: 
  4193.  
  4194.     unset *
  4195.  
  4196.  
  4197. ΓòÉΓòÉΓòÉ 3.75. VER - Display 4OS2 and OS/2 versions ΓòÉΓòÉΓòÉ
  4198.  
  4199. SYNTAX     (Internal 4OS2) 
  4200.  
  4201. VER [/R]
  4202.  
  4203. PURPOSE 
  4204.  
  4205. Display the current 4OS2 and OS/2 versions. 
  4206.  
  4207. COMMENTS 
  4208.  
  4209. The 4OS2 and OS/2 versions consist of a one digit major version number, a 
  4210. period, and a one or two digit minor version number. 
  4211.  
  4212. The only option for VER is: 
  4213.  
  4214.     /R      Display the OS/2 and 4OS2 revision levels. 
  4215.  
  4216.  EXAMPLES 
  4217.  
  4218.  Get the current version of 4OS2 and OS/2: 
  4219.  
  4220.       ver
  4221.  
  4222.  
  4223. ΓòÉΓòÉΓòÉ 3.76. VERIFY - Set disk write verification ΓòÉΓòÉΓòÉ
  4224.  
  4225. SYNTAX     (Internal 4OS2) 
  4226.  
  4227. VERIFY [on | off]
  4228.  
  4229. PURPOSE 
  4230.  
  4231. Display, enable, or disable disk write verification. 
  4232.  
  4233. COMMENTS 
  4234.  
  4235. When VERIFY is ON, the system will verify that no error occurred during each 
  4236. disk write operation.  It does NOT compare the data actually written to the 
  4237. disk.  VERIFY will remain ON until you set it OFF. 
  4238.  
  4239. Entering VERIFY with no parameters will display the current VERIFY state. 
  4240.  
  4241. Verification will slow your disk write operations slightly. 
  4242.  
  4243. At system startup, VERIFY is OFF. 
  4244.  
  4245. EXAMPLES 
  4246.  
  4247. Check the current verify status: 
  4248.  
  4249.     verify
  4250.  
  4251. Enable disk write verification: 
  4252.  
  4253.     verify on
  4254.  
  4255.  
  4256. ΓòÉΓòÉΓòÉ 3.77. VOL - Display volume labels ΓòÉΓòÉΓòÉ
  4257.  
  4258. SYNTAX     (Internal 4OS2) 
  4259.  
  4260. VOL [d:] ...
  4261.  
  4262. PURPOSE 
  4263.  
  4264. Display the disk volume label(s). 
  4265.  
  4266. COMMENTS 
  4267.  
  4268. If you don't enter a drive name, VOL displays the disk label and the volume 
  4269. serial number for the current drive. 
  4270.  
  4271. If the disk doesn't have a volume name, VOL will report it as "unlabeled." 
  4272.  
  4273. Volume labels can be created, changed or deleted with the LABEL command. 
  4274.  
  4275. EXAMPLES 
  4276.  
  4277. Display the disk labels for drives A and B: 
  4278.  
  4279.     vol a: b:
  4280.  
  4281.  
  4282. ΓòÉΓòÉΓòÉ 3.78. VSCRPUT - Write vertical text ΓòÉΓòÉΓòÉ
  4283.  
  4284. SYNTAX     (Internal 4OS2) 
  4285.  
  4286. VSCRPUT row column [bright] [blink] fg ON bg text
  4287.  
  4288. PURPOSE 
  4289.  
  4290. Display text in color in a vertical column. 
  4291.  
  4292. COMMENTS 
  4293.  
  4294. The row and column numbering is zero-based, so on a standard 25 row by 80 
  4295. column display, valid rows are 0 - 24 and valid columns are 0 - 79. 
  4296.  
  4297. VSCRPUT works like SCRPUT, but writes the text vertically. 
  4298.  
  4299. The parameters are: 
  4300.  
  4301.     row         Start row 
  4302.  
  4303.     column      Start column 
  4304.  
  4305.     fg          Foreground character color 
  4306.  
  4307.     bg          Background character color 
  4308.  
  4309.     text        The text to display 
  4310.  
  4311.  Only the first three characters of the color name and attributes ("bright" and 
  4312.  "blink") are required. 
  4313.  
  4314.  The available colors are: 
  4315.  
  4316.       Black      Blue      Green      Red
  4317.       Magenta    Cyan      Yellow     White
  4318.  
  4319.  See also ECHO, SCREEN, SCRPUT, and TEXT. 
  4320.  
  4321.  EXAMPLES 
  4322.  
  4323.  The following batch file fragment displays an X and Y axis and labels them: 
  4324.  
  4325.       drawhline 20 10 40 1 bright white on blue
  4326.       drawvline 2 10 18 1 bright white on blue
  4327.       scrput 21 20 bright red on blue X axis
  4328.       vcrput 8 9 bright red on blue Y axis
  4329.  
  4330.  
  4331. ΓòÉΓòÉΓòÉ 3.79. Y - Y pipe fitting ΓòÉΓòÉΓòÉ
  4332.  
  4333. SYNTAX     (Internal 4OS2) 
  4334.  
  4335. Y [d:][path]filename...
  4336.  
  4337. PURPOSE 
  4338.  
  4339. Copy standard input to standard output, and then copy the specified file(s) to 
  4340. standard output. 
  4341.  
  4342. COMMENTS 
  4343.  
  4344. Standard input from the console is terminated by a ^Z. 
  4345.  
  4346. See also TEE. 
  4347.  
  4348. EXAMPLES 
  4349.  
  4350. Get text from standard input, append the files MEMO1 and MEMO2 to it, and send 
  4351. the output to MEMOS: 
  4352.  
  4353.     y memo1 memo2 > memos
  4354.  
  4355.  
  4356. ΓòÉΓòÉΓòÉ 4. 4OS2 Reference tables ΓòÉΓòÉΓòÉ
  4357.  
  4358. This section includes an ASCII character table, an ANSI command reference, and 
  4359. a list of the keycodes used by INKEY. 
  4360.  
  4361.  
  4362. ΓòÉΓòÉΓòÉ 4.1. ASCII table ΓòÉΓòÉΓòÉ
  4363.  
  4364.                       Control Characters
  4365.  
  4366.     Dec  Hex  Chr  Nam  Ctl   Γöé   Dec  Hex  Chr  Nam  Ctl
  4367.     ---  ---  ---  ---  ---   Γöé   ---  ---  ---  ---  ---
  4368.     000   00       NUL   ^@   Γöé   016   10      DLE   ^P
  4369.     001   01      SOH   ^A   Γöé   017   11      DC1   ^Q
  4370.     002   02      STX   ^B   Γöé   018   12      DC2   ^R
  4371.     003   03      ETX   ^C   Γöé   019   13      DC3   ^S
  4372.     004   04      EOT   ^D   Γöé   020   14      DC4   ^T
  4373.     005   05      ENQ   ^E   Γöé   021   15      NAK   ^U
  4374.     006   06      ACK   ^F   Γöé   022   16      SYN   ^V
  4375.     007   07       BEL   ^G   Γöé   023   17      ETB   ^W
  4376.     008   08      BS    ^H   Γöé   024   18      CAN   ^X
  4377.     009   09       HT    ^I   Γöé   025   19      EM    ^Y
  4378.     010   0A       LF    ^J   Γöé   026   1A      SUB   ^Z
  4379.     011   0B       VT    ^K   Γöé   027   1B      ESC   ^[
  4380.     012   0C       FF    ^L   Γöé   028   1C      FS    ^\
  4381.     013   0D       CR    ^M   Γöé   029   1D      GS    ^]
  4382.     014   0E      SO    ^N   Γöé   030   1E      RS    ^^
  4383.     015   0F      SI    ^O   Γöé   031   1F      US    ^_
  4384.  
  4385.                   Punctuation, Digits, Upper Case
  4386.  
  4387.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4388.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4389.   032   20      Γöé  048   30   0  Γöé  064   40   @  Γöé  080   50   P
  4390.   033   21   !  Γöé  049   31   1  Γöé  065   41   A  Γöé  081   51   Q
  4391.   034   22   "  Γöé  050   32   2  Γöé  066   42   B  Γöé  082   52   R
  4392.   035   23   #  Γöé  051   33   3  Γöé  067   43   C  Γöé  083   53   S
  4393.   036   24   $  Γöé  052   34   4  Γöé  068   44   D  Γöé  084   54   T
  4394.   037   25   %  Γöé  053   35   5  Γöé  069   45   E  Γöé  085   55   U
  4395.   038   26   &  Γöé  054   36   6  Γöé  070   46   F  Γöé  086   56   V
  4396.   039   27   '  Γöé  055   37   7  Γöé  071   47   G  Γöé  087   57   W
  4397.   040   28   (  Γöé  056   38   8  Γöé  072   48   H  Γöé  088   58   X
  4398.   041   29   )  Γöé  057   39   9  Γöé  073   49   I  Γöé  089   59   Y
  4399.   042   2A   *  Γöé  058   3A   :  Γöé  074   4A   J  Γöé  090   5A   Z
  4400.   043   2B   +  Γöé  059   3B   ;  Γöé  075   4B   K  Γöé  091   5B   [
  4401.   044   2C   ,  Γöé  060   3C   <  Γöé  076   4C   L  Γöé  092   5C   \
  4402.   045   2D   -  Γöé  061   3D   =  Γöé  077   4D   M  Γöé  093   5D   ]
  4403.   046   2E   .  Γöé  062   3E   >  Γöé  078   4E   N  Γöé  094   5E   ^
  4404.   047   2F   /  Γöé  063   3F   ?  Γöé  079   4F   O  Γöé  095   5F   _
  4405.  
  4406.                    Lower Case, Miscellaneous
  4407.  
  4408.                  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4409.                  ---  ---  --- Γöé  ---  ---  ---
  4410.                  096   60   `  Γöé  112   70   p
  4411.                  097   61   a  Γöé  113   71   q
  4412.                  098   62   b  Γöé  114   72   r
  4413.                  099   63   c  Γöé  115   73   s
  4414.                  100   64   d  Γöé  116   74   t
  4415.                  101   65   e  Γöé  117   75   u
  4416.                  102   66   f  Γöé  118   76   v
  4417.                  103   67   g  Γöé  119   77   w
  4418.                  104   68   h  Γöé  120   78   x
  4419.                  105   69   i  Γöé  121   79   y
  4420.                  106   6A   j  Γöé  122   7A   z
  4421.                  107   6B   k  Γöé  123   7B   {
  4422.                  108   6C   l  Γöé  124   7C   |
  4423.                  109   6D   m  Γöé  125   7D   }
  4424.                  110   6E   n  Γöé  126   7E   ~
  4425.                  111   6F   o  Γöé  127   7F   
  4426.  
  4427.                 International; Graphics Characters 1
  4428.  
  4429.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4430.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4431.   128   80   ╨É  Γöé  144   90   ╨á  Γöé  160   A0   ╨░  Γöé  176   B0   Γûæ
  4432.   129   81   ╨æ  Γöé  145   91   ╨í  Γöé  161   A1   ╨▒  Γöé  177   B1   ΓûÆ
  4433.   130   82   ╨Æ  Γöé  146   92   ╨ó  Γöé  162   A2   ╨▓  Γöé  178   B2   Γûô
  4434.   131   83   ╨ô  Γöé  147   93   ╨ú  Γöé  163   A3   ╨│  Γöé  179   B3   Γöé
  4435.   132   84   ╨ö  Γöé  148   94   ╨ñ  Γöé  164   A4   ╨┤  Γöé  180   B4   Γöñ
  4436.   133   85   ╨ò  Γöé  149   95   ╨Ñ  Γöé  165   A5   ╨╡  Γöé  181   B5   Γòí
  4437.   134   86   ╨û  Γöé  150   96   ╨ª  Γöé  166   A6   ╨╢  Γöé  182   B6   Γòó
  4438.   135   87   ╨ù  Γöé  151   97   ╨º  Γöé  167   A7   ╨╖  Γöé  183   B7   Γòû
  4439.   136   88   ╨ÿ  Γöé  152   98   ╨¿  Γöé  168   A8   ╨╕  Γöé  184   B8   Γòò
  4440.   137   89   ╨Ö  Γöé  153   99   ╨⌐  Γöé  169   A9   ╨╣  Γöé  185   B9   Γòú
  4441.   138   8A   ╨Ü  Γöé  154   9A   ╨¬  Γöé  170   AA   ╨║  Γöé  186   BA   Γòæ
  4442.   139   8B   ╨¢  Γöé  155   9B   ╨½  Γöé  171   AB   ╨╗  Γöé  187   BB   Γòù
  4443.   140   8C   ╨£  Γöé  156   9C   ╨¼  Γöé  172   AC   ╨╝  Γöé  188   BC   Γò¥
  4444.   141   8D   ╨¥  Γöé  157   9D   ╨¡  Γöé  173   AD   ╨╜  Γöé  189   BD   Γò£
  4445.   142   8E   ╨₧  Γöé  158   9E   ╨«  Γöé  174   AE   ╨╛  Γöé  190   BE   Γò¢
  4446.   143   8F   ╨ƒ  Γöé  159   9F   ╨»  Γöé  175   AF   ╨┐  Γöé  191   BF   ΓöÉ
  4447.  
  4448.                   Graphics Characters 2; Symbols
  4449.  
  4450.   Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr Γöé  Dec  Hex  Chr
  4451.   ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  --- Γöé  ---  ---  ---
  4452.   192   C0   Γöö  Γöé  208   D0   Γò¿  Γöé  224   E0   ╤Ç  Γöé  240   F0   ╨ü
  4453.   193   C1   Γö┤  Γöé  209   D1   Γòñ  Γöé  225   E1   ╤ü  Γöé  241   F1   ╤æ
  4454.   194   C2   Γö¼  Γöé  210   D2   ΓòÑ  Γöé  226   E2   ╤é  Γöé  242   F2   ╨ä
  4455.   195   C3   Γö£  Γöé  211   D3   ΓòÖ  Γöé  227   E3   ╤â  Γöé  243   F3   ╤ö
  4456.   196   C4   ΓöÇ  Γöé  212   D4   Γòÿ  Γöé  228   E4   ╤ä  Γöé  244   F4   ╨ç
  4457.   197   C5   Γö╝  Γöé  213   D5   ΓòÆ  Γöé  229   E5   ╤à  Γöé  245   F5   ╤ù
  4458.   198   C6   Γò₧  Γöé  214   D6   Γòô  Γöé  230   E6   ╤å  Γöé  246   F6   ╨Ä
  4459.   199   C7   Γòƒ  Γöé  215   D7   Γò½  Γöé  231   E7   ╤ç  Γöé  247   F7   ╤₧
  4460.   200   C8   ΓòÜ  Γöé  216   D8   Γò¬  Γöé  232   E8   ╤ê  Γöé  248   F8   ┬░
  4461.   201   C9   Γòö  Γöé  217   D9   Γöÿ  Γöé  233   E9   ╤ë  Γöé  249   F9   ΓêÖ
  4462.   202   CA   Γò⌐  Γöé  218   DA   Γöî  Γöé  234   EA   ╤è  Γöé  250   FA   ┬╖
  4463.   203   CB   Γòª  Γöé  219   DB   Γûê  Γöé  235   EB   ╤ï  Γöé  251   FB   ΓêÜ
  4464.   204   CC   Γòá  Γöé  220   DC   Γûä  Γöé  236   EC   ╤î  Γöé  252   FC   Γäû
  4465.   205   CD   ΓòÉ  Γöé  221   DD   Γûî  Γöé  237   ED   ╤ì  Γöé  253   FD   ┬ñ
  4466.   206   CE   Γò¼  Γöé  222   DE   ΓûÉ  Γöé  238   EE   ╤Ä  Γöé  254   FE   Γûá
  4467.   207   CF   Γòº  Γöé  223   DF   ΓûÇ  Γöé  239   EF   ╤Å  Γöé  255   FF
  4468.  
  4469.  
  4470. ΓòÉΓòÉΓòÉ 4.2. ANSI reference ΓòÉΓòÉΓòÉ
  4471.  
  4472. This section is a quick-reference to commonly-used ANSI commands.  This 
  4473. information is generally applicable to OS/2 and the DOS ANSI drivers. 
  4474.  
  4475. An ANSI command string consists of three parts: 
  4476.  
  4477.     ESC[            The ASCII character ESC, followed by a left bracket. These 
  4478.                     two characters must be present in all ANSI strings. 
  4479.     parameters      Optional parameters for the command.  If there are multiple 
  4480.                     parameters they are separated by semicolons. 
  4481.     cmd             A single-letter command.  The case of the letter IS 
  4482.                     meaningful. 
  4483.  
  4484.  For example, to position the cursor to row 7, column 12 the ANSI command is: 
  4485.  
  4486.       ESC[7;12H
  4487.  
  4488.  To transmit ANSI commands to the screen with 4OS2, you should use the ECHO 
  4489.  command.  The ESC character can be generated by inserting it into the string 
  4490.  directly (if you are putting the string in a batch file and your editor will 
  4491.  insert such a character), or by using the internal "escape" character (the 
  4492.  4OS2 default escape character is the caret ^) followed by a lower-case "e". 
  4493.  
  4494.  You can also include ANSI commands in your prompt, using $e to transmit the 
  4495.  ESC character.  You can NOT use PROMPT to transmit ANSI commands to the screen 
  4496.  from a batch file. 
  4497.  
  4498.  Commands 
  4499.  
  4500.     ESC[rowsA               Cursor up 
  4501.     ESC[rowsB               Cursor down 
  4502.     ESC[colsC               Cursor right 
  4503.     ESC[colsD               Cursor left 
  4504.     ESC[row;colH            Set cursor position (top left is row 1, column 1) 
  4505.     ESC[2J                  Clear screen 
  4506.     ESC[K                   Clear from cursor to end of line 
  4507.     ESC[row;colf            Set cursor position, same as "H" command 
  4508.     ESC[=modeh              Set display mode; see table of mode values below 
  4509.     ESC[=model              Set display mode; see table of mode values below 
  4510.     ESC[attr;attr;...m      Set display attributes; see table of attribute 
  4511.                             values below 
  4512.     ESC[key;string;...p     Substitute "string" for the specified key; see key 
  4513.                             substitutions section below. 
  4514.     ESC[s                   Save cursor position (may not be nested) 
  4515.     ESC[u                   Restore cursor position after a save 
  4516.  
  4517.  Display Attributes 
  4518.  
  4519.     0         All attributes off (normal white on black) 
  4520.     1         High intensity (bold) 
  4521.     2         Normal intensity 
  4522.     4         Underline (usually effective only on monochrome displays) 
  4523.     5         Blinking 
  4524.     7         Reverse Video 
  4525.     8         Invisible 
  4526.     30-37     Set the foreground color: 
  4527.                 30=Black   31=Red    32=Green  33=Yellow 
  4528.                 34=Blue    35=Magenta  36=Cyan   37=White 
  4529.     40-47     Set the background color, same values as above but substitute 40 
  4530.               for 30 etc. 
  4531.  
  4532.  Settings are cumulative, so (for example) to set a bright red foreground, 
  4533.  first set all attributes off, then set red, then bold: 
  4534.  
  4535.       echo ^e[0;31;1m
  4536.  
  4537.  Display Modes 
  4538.  
  4539.     0       Text 40x25 monochrome 
  4540.     1       Text 40x25 color 
  4541.     2       Text 80x25 monochrome 
  4542.     3       Text 80x25 color 
  4543.     4       Graphics 320x200 4-color 
  4544.     5       Graphics 320x200 4-color 
  4545.     6       Graphics 640x200 2-color 
  4546.     7       (cursor wrap kludge) 
  4547.  
  4548.  Mode  7 is an unfortunate kludge; Setting mode 7 with an "h" command tells 
  4549.  ANSI to wrap text to the next line when it passes the end of a line; setting 
  4550.  mode 7 with an "l" (lower-case L) command tells ANSI not to wrap text.  For 
  4551.  all other modes the "h" and "l" commands are equivalent. 
  4552.  
  4553.  Key Substitutions 
  4554.  
  4555.  The key substitutions ("p") command causes ANSI to substitute the text in 
  4556.  "string" when the specified key is pressed.  The key code can be a single 
  4557.  character in quotes, a numeric ASCII value, or an extended code for a non 
  4558.  ASCII key (e.g. function or cursor keys) in the form 0;n, where n is the scan 
  4559.  code for the key. 
  4560.  
  4561.  The string to be substituted can be a single character or character string in 
  4562.  quotes, a numeric ASCII value, or an extended key code. 
  4563.  
  4564.  For a list of numeric ASCII values, see ASCII. 
  4565.  
  4566.  To clear a key substitution, "substitute" the original key for itself (see 
  4567.  examples). 
  4568.  
  4569.  Examples 
  4570.  
  4571.  Clear the display attributes, then set the display to bright cyan on blue, and 
  4572.  clear the screen: 
  4573.  
  4574.       echo ^e[0;44;36;1m^e[2J
  4575.  
  4576.  Substitute "dir"<cr> for F4: 
  4577.  
  4578.       echo ^e[0;62;"dir";13p
  4579.  
  4580.  Undo the above substitution: 
  4581.  
  4582.       echo ^e[0;62;0;62p
  4583.  
  4584.  Set up a prompt that saves the cursor position, displays the 4OS2 shell level, 
  4585.  date, and time on the top line in bright white on magenta, and then restores 
  4586.  the cursor position and sets the color to bright cyan on blue, and displays 
  4587.  the standard prompt: 
  4588.  
  4589.       prompt $e[s$e[1;1f$e[0;45;37;1m$e[K($z)   $d   $t$e[u$e[0;44;36;1m$p$g
  4590.  
  4591.  
  4592. ΓòÉΓòÉΓòÉ 4.3. Extended Key Codes ΓòÉΓòÉΓòÉ
  4593.  
  4594. Key Mapping Directives 
  4595.  
  4596. The format for a key name is:  [Prefix-]Keyname.  The prefix and key name must 
  4597. be separated by a dash.  The prefix can be left out, or it can be any of the 
  4598. following: 
  4599.  
  4600.     Alt     followed by A - Z, 0 - 9, F1 - F12, or Bksp
  4601.     Ctrl    followed by A - Z, F1 - F12, Bksp, Enter,
  4602.               Left, Right, Home, End, PgUp, PgDn, Ins, or Del
  4603.     Shift   followed by F1 - F12 or Tab.
  4604.  
  4605. The possible key names are: 
  4606.  
  4607.     A - Z       Esc         Up          PgUp
  4608.     0 - 9       Bksp        Down        PgDn
  4609.     F1 - F12    Tab         Left        Home
  4610.     Ins         Enter       Right       End
  4611.     Del
  4612.  
  4613. The following table lists the common extended key codes used by INKEY: 
  4614.  
  4615.     F1  @59   Alt-F1  @104   Ctl-F1  @94    Shift-F1  @84
  4616.     F2  @60   Alt-F2  @105   Ctl-F2  @95    Shift-F2  @85
  4617.     F3  @61   Alt-F3  @106   Ctl-F3  @96    Shift-F3  @86
  4618.     F4  @62   Alt-F4  @107   Ctl-F4  @97    Shift-F4  @87
  4619.     F5  @63   Alt-F5  @108   Ctl-F5  @98    Shift-F5  @88
  4620.     F6  @64   Alt-F6  @109   Ctl-F6  @99    Shift-F6  @89
  4621.     F7  @65   Alt-F7  @110   Ctl-F7  @100   Shift-F7  @90
  4622.     F8  @66   Alt-F8  @111   Ctl-F8  @101   Shift-F8  @91
  4623.     F9  @67   Alt-F9  @112   Ctl-F9  @102   Shift-F9  @92
  4624.     F10 @68   Alt-F10 @113   Ctl-F10 @103   Shift-F10 @93
  4625.  
  4626.     Home  @71     Up    @72     PgUp   @73
  4627.     Left  @75                   Right  @77
  4628.     End   @79     Down  @80     PgDn   @81
  4629.     Ins   @82     Del   @83
  4630.  
  4631.     Ctl-Home  @119     Ctl-PgUp   @132
  4632.     Ctl-Left  @115     Ctl-Right  @116
  4633.     Ctl-End   @117     Ctl-PgDn   @118
  4634.  
  4635.     Ctl-A  1    Ctl-N  14
  4636.     Ctl-B  2    Ctl-O  15
  4637.     Ctl-C  3    Ctl-P  16
  4638.     Ctl-D  4    Ctl-Q  17
  4639.     Ctl-E  5    Ctl-R  18
  4640.     Ctl-F  6    Ctl-S  19
  4641.     Ctl-G  7    Ctl-T  20
  4642.     Ctl-H  8    Ctl-U  21
  4643.     Ctl-I  9    Ctl-V  22
  4644.     Ctl-J  10   Ctl-W  23
  4645.     Ctl-K  11   Ctl-X  24
  4646.     Ctl-L  12   Ctl-Y  25
  4647.     Ctl-M  13   Ctl-Z  26
  4648.  
  4649.     Alt-A  @30   Alt-N  @49   Alt-1  @120
  4650.     Alt-B  @48   Alt-O  @24   Alt-2  @121
  4651.     Alt-C  @46   Alt-P  @25   Alt-3  @122
  4652.     Alt-D  @32   Alt-Q  @16   Alt-4  @123
  4653.     Alt-E  @18   Alt-R  @19   Alt-5  @124
  4654.     Alt-F  @33   Alt-S  @31   Alt-6  @125
  4655.     Alt-G  @34   Alt-T  @20   Alt-7  @126
  4656.     Alt-H  @35   Alt-U  @22   Alt-8  @127
  4657.     Alt-I  @23   Alt-V  @47   Alt-9  @128
  4658.     Alt-J  @36   Alt-W  @17   Alt-0  @129
  4659.     Alt-K  @37   Alt-X  @45
  4660.     Alt-L  @38   Alt-Y  @21
  4661.     Alt-M  @50   Alt-Z  @44
  4662.